I could not understand why this error is occurred
I have created yesod-sqlite project using stack command as follow the instruction in yesod quick start after creating It's working fine. but I want to add my page by follow the instruction and example in this example
Echo.hs handler code is as follows:
module Handler.Echo where
import Import
import Data.Text (Text)
import qualified Data.Text as T
import Yesod
getEchoR :: Text -> Handler Html
getEchoR theText = defaultLayout [whamlet|<h1>Hello #{theText}!|]
When I run yesod devel in command prompt I got the following error:
E:\haskell\yesod-new\src\Handler\Echo.hs:9:58: error: parse error on input `{' | 9 | getEchoR theText = defaultLayout [whamlet|Hello #{theText}!|] |
^-- While building custom Setup.hs for package yesod-new-0.0.0 using: C:\Users\RajeshTarle\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\ Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.3.exe --builddir=.stack-work\dist\7d103d30 build lib:yesod-new --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Type help for available commands. Press enter to force a rebuild.
I am using Windows please help me. Thanks.
Put the following on top of your file:
{-# LANGUAGE QuasiQuotes #-}
See https://wiki.haskell.org/Quasiquotation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With