haskell - Basic Yesod Hello World! giving me parse error -


i beginning learn yesod through book developing web applications haskell , yesod. first thing book has after installing few requirements write hello world! despite copying program verbatim book, getting parse error. bit of background, have no experience in web development, , knowledge of haskell pretty contained learn haskell, quite lost.

here said code:

-- hello world yesod  {-# language templatehaskell, typefamilies, quasiquotes, multiparamtypeclasses,     overloadedstrings #-}  import yesod  data helloworld = helloworld  mkyesod "helloworld" [parseroutes | / homer |]  instance yesod helloworld  gethomer :: handler rephtml gethomer = defaultlayout [whamlet | hello world! |]  main :: io() main = warpdebug 3000 helloworld 

the compiler telling me this:

c:\haskell\yesod>runhaskell helloworld.hs  helloworld.hs:11:1:     parse error (possibly incorrect indentation or mismatched brackets) 

i got file load (with warnings) deleting spaces before pipes in quasiquoter lines, [parseroutes| instead of [parseroutes | , [whamlet| instead of [whamlet |.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -