我试图编译以下内容:
postRQuery :: Handler RepHtml
postRQuery = do
properties <- liftIO $ decodeFile "store" :: IO (Map String ())
defaultLayout [whamlet|Posted!|]
但我收到以下编译器错误:
Couldn't match expected type `GGHandler
Bayith
Bayith
(Data.Enumerator.Iteratee
Data.ByteString.Internal.ByteString IO)
t0'
with actual type `IO (Map String ())'
In a stmt of a 'do' expression:
properties <- liftIO $ decodeFile "store" :: IO (Map String ())
关于如何在 Yesod 处理程序中使用 Data.Binary.decodeFile 的任何想法?