<div dir="ltr">I don't think there's enough information in the snippet you've given to determine what the problem is. And in general, it's a good idea to include the actual error message from the compiler.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 12, 2012 at 5:02 AM, Alexander V Vershilov <span dir="ltr"><<a href="mailto:alexander.vershilov@gmail.com" target="_blank">alexander.vershilov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I have problems with writing next code (using network-conduit)<br>
<br>
slightly simplified version:<br>
<br>
> app ad = appSource ad $$ sink<br>
> where<br>
> cMap = M.fromList [ ("upload", cmdUpload), ("download", cmdDownload) ]<br>
> sink = takeLine >>= \c -> case c of Just run -> run ; Nothing -> return ()<br>
> cmdUpload = {- ... -} CB.sinkFile path<br>
> cmdDownload = do<br>
> {- code here -}<br>
> CB.sourceFile path $$ appSink ad -- this will not work because of<br>
> -- type error<br>
<br>
And I'm catching "cannot construct the infinite type".<br>
<br>
I've found an example in [1], but it's not exactly solves my problem, as all<br>
the logic is inside conduit, and it will break upload function.<br>
<br>
[1] <a href="http://www.yesodweb.com/blog/2012/06/conduit-0-5" target="_blank">http://www.yesodweb.com/blog/2012/06/conduit-0-5</a><br>
<br>
--<br>
Alexander Vershilov<br>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>