Probably the most expedient thing is to use `withFile` to get a Handle, and then use `conduitHandle` instead of `conduitFile`. However, if you want to use ResourceT, it's certainly possible, but a bit hairier:

        runResourceT $ withInternalState $ \is -> do
            respond $ WC.responseSource (HCl.responseStatus res) headers
                    $ C.transPipe (flip runInternalState is) body


On Fri, Mar 27, 2015 at 11:01 AM Jos van den Oever <jos@vandenoever.info> wrote:
On Friday 27 March 2015 05:03:18 Michael Snoyman wrote:
> Can you provide:
>
> * A complete file
> * The error messages you're getting

Of course.

=====================
No instance for (MonadResource IO)
  arising from a use of `fileSaver'
In the second argument of `(C.=$=)', namely `fileSaver'
In the expression: bodySource C.=$= fileSaver
In an equation for `source2': source2 = bodySource C.=$= fileSaver
        HttpWrite.hs    /proxy/src      line 35 Haskell Problem
=====================

I know that I should somehow put some of the code a runResourceT, but I cannot
figure out how to combine it with Wai.Application.

Cheers,
Jos
_______________________________________________
web-devel mailing list
web-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/web-devel