<div dir="ltr">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:<div><br></div><div><div> runResourceT $ withInternalState $ \is -> do</div><div> respond $ WC.responseSource (HCl.responseStatus res) headers</div><div> $ C.transPipe (flip runInternalState is) body</div><div><br></div><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 11:01 AM Jos van den Oever <<a href="mailto:jos@vandenoever.info" target="_blank">jos@vandenoever.info</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Friday 27 March 2015 05:03:18 Michael Snoyman wrote:<br>
> Can you provide:<br>
><br>
> * A complete file<br>
> * The error messages you're getting<br>
<br>
Of course.<br>
<br>
=====================<br>
No instance for (MonadResource IO)<br>
arising from a use of `fileSaver'<br>
In the second argument of `(C.=$=)', namely `fileSaver'<br>
In the expression: bodySource C.=$= fileSaver<br>
In an equation for `source2': source2 = bodySource C.=$= fileSaver<br>
HttpWrite.hs /proxy/src line 35 Haskell Problem<br>
=====================<br>
<br>
I know that I should somehow put some of the code a runResourceT, but I cannot<br>
figure out how to combine it with Wai.Application.<br>
<br>
Cheers,<br>
Jos<br>
______________________________<u></u><u></u>_________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org" target="_blank">web-devel@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/web-devel" target="_blank">http://mail.haskell.org/cgi-<u></u>bi<u></u>n/mailman/listinfo/web-devel</a><br>
</blockquote></div></div></div>