沙洛姆!我使用Yesod编写了以下程序:
main = warp 2060 $
onStatic "home" (dispatchTo $ return $ h1 $ toHtml "Sheepfold")
但是当我运行它时,我收到以下错误:
No instance for (YesodDispatch
(Control.Monad.Trans.Writer.Lazy.Writer LiteApp ()))
arising from a use of `warp'
Possible fix:
add an instance declaration for
(YesodDispatch (Control.Monad.Trans.Writer.Lazy.Writer LiteApp ()))
In the expression: warp 2060
In the expression:
warp 2060
$ onStatic "home" (dispatchTo $ return $ h1 $ toHtml "Sheepfold")
In an equation for `main':
main
= warp 2060
$ onStatic "home" (dispatchTo $ return $ h1 $ toHtml "Sheepfold")
有人可以帮忙吗?