
10 May
2014
10 May
'14
1:59 p.m.
On Sat, May 10, 2014 at 1:49 PM, Alexander Berntsen
But if I chuck it in a source file and attempt to runhaskell or compile it, this fails with a very nasty error. Oh, what fun! To make it work ni a source file, you need a type signature in there somewhere. E.g.:
main = mapM_ (\n -> printf "%d %d" (n :: Int) (n^2)) [1..100]
This works fine. This is indeed interesting! Someone care to additionally make it enlightening as well?
http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluati... -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net