0
내가 시도한 다음yesod를 사용하면 어떻게 사용자 정의 HTTP 상태 코드로 defaultLayout을 보낼 수 있습니까?
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)