【发布时间】:2016-11-24 08:06:44
【问题描述】:
我尝试了以下方法:
sendResponseStatus status403 $ (defaultLayout [whamlet|Foo|] :: Handler Html)
这给了我这种类型的错误:
<interactive>:1:1: Warning:
Could not deduce (ToTypedContent (Handler Html))
arising from a use of ‘sendResponseStatus’
from the context (MonadHandler m)
bound by the inferred type of it :: MonadHandler m => m a
at <interactive>:1:1
In the expression: sendResponseStatus status403
In the expression:
sendResponseStatus status403
$ (defaultLayout
((asWidgetT . toWidget)
((blaze-markup-0.7.0.3:Text.Blaze.Internal.preEscapedText
. Data.Text.pack)
"Foo")) ::
Handler Html)
【问题讨论】: