[Haskell-cafe] Lazy data from pipe using MissingH module

Dougal Stanton ithika at gmail.com
Thu Nov 9 10:37:57 EST 2006

Newbie here working on a little program for fetching podcasts. I've been
using the MissingH.Cmd module in concert with curl to download the RSS
feeds like this:

> fetchFeed :: Subscription -> IO (Either Error [Episode])
> fetchFeed sub = do
>     (pid, feed)  <- pipeFrom "curl" (curlOpts ++
>                              ["--url", (slocation sub)])
>     let eps = parseEpisodes (stitle sub) feed
>     forceSuccess pid
>     return eps

According to the API docs I have to forceSuccess pid *after* I use the
data. Will this construct do that, or does the compiler have free reign
to move the line beginning 'let ...' wherever it feels?

It seems to work occasionally for me but then just hangs, so I thought
this might be the problem.



Dougal Stanton <ithika at gmail.com>
Word attachments considered harmful.

More information about the Haskell-Cafe mailing list