[Haskell-cafe] program execution and laziness
Ferenc Wagner
wferi at niif.hu
Thu Sep 14 06:43:08 EDT 2006
Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:
>> out <- hGetContents o
>> -- print out
>
>> How can I force hGetContents to be strict (or at least to completely
>> process the stream prior to the waitForProcess command)?
>
> return $! last out
You will still get into trouble if the command produces copious error
output. See runCommand in
http://happs.org/HAppS/src/HAppS/Util/Common.hs
for a GPL'd solution.
--
Feri.
More information about the Haskell-Cafe
mailing list