Trying to upgrade this code from WAI 1.4.1 to 2.0.0. On one hand, I don't have to liftIO the IO action on line 23 anymore. On the other, this line that writes the request body to a file seems to be giving me some trouble now:No instance for (MonadResource IO) arising from a use of `sinkFile'Possible fix: add an instance declaration for (MonadResource IO)In the second argument of `($$)', namely`sinkFile ("sources" </> fromText name)'In a stmt of a 'do' block:requestBody req $$ sinkFile ("sources" </> fromText name)If I put a "runResouceT" in front of that, like "runResourceT $ requestBody req $$ sinkFile ("sources" </> fromText name)", I getCouldn't match type `IO' with `ResourceT IO'Expected type: Data.Conduit.Internal.Source(ResourceT IO) Data.ByteString.Internal.ByteStringActual type: Data.Conduit.Internal.SourceIO Data.ByteString.Internal.ByteStringIn the return type of a call of `requestBody'In the first argument of `($$)', namely `requestBody req'In the second argument of `($)', namely`requestBody req $$ sinkFile ("sources" </> fromText name)'Any pointers?
_______________________________________________
web-devel mailing list
web-devel@haskell.org
http://www.haskell.org/mailman/listinfo/web-devel