我有呈现一个HTML标签,像这样一个简单的耶索德处理程序:路线插值失败,并在耶索德处理程序类型错误
getHomeR :: Yesod site => HandlerT site IO Html
getHomeR = defaultLayout
[whamlet|$newline never
<h1>Hello!
|]
我想打印的路线,并改变使用@{HomeR}
代码路线插值语法,就像这样:
getHomeR :: Yesod site => HandlerT site IO Html
getHomeR = defaultLayout
[whamlet|$newline never
<h1>@{HomeR}
|]
插值在我耶索德处理器路线失败,此错误:
• Couldn't match type ‘site’ with ‘App’
‘site’ is a rigid type variable bound by
the type signature for:
getHomeR :: forall site. Yesod site => HandlerT site IO Html
at Handler/Home.hs:12:13
Expected type: WidgetT
site IO (Route App -> [(Text, Text)] -> Text)
Actual type: WidgetT
site
IO
(Route (HandlerSite (WidgetT site IO)) -> [(Text, Text)] -> Text)