
16 Apr
2010
16 Apr
'10
10:37 a.m.
Am Freitag 16 April 2010 16:25:08 schrieb Heinrich Apfelmus:
Philip Scott wrote:
What I want is something like putStrLn that doesn't print anything, and takes any type as its input, evaluates it to normal form and then does nothing else. It might be called something like 'evaluate' have a type like this
evaluate :: a -> IO()
With Hoogle, you can search for types:
http://haskell.org/hoogle/?hoogle=a+-%3E+IO+%28%29
12th result from the top.
That evaluates only to WHNF. Control.DeepSeq.rnf seems to be closer, but requires NFData instances.
Regards, Heinrich Apfelmus