
1 Mar
2006
1 Mar
'06
4:57 p.m.
On Thu, 16 Feb 2006, Udo Stenzel
hPutStr stdout $ foldr seq veryLongString veryLongString
There is no primitive to do this for arbitrary data types, but the DeepSeq type class comes close. You can find DeepSeq and some more hints on strict evaluation at http://users.aber.ac.uk/afc/stricthaskell.html.
You can also use Control.Parallel.Strategies: Prelude Control.Parallel.Strategies> take 2 (repeat 'x') "xx" Prelude Control.Parallel.Strategies> take 2 (repeat 'x' `using` rnf) " (No more output.) -- /NAD