
13 Aug
2013
13 Aug
'13
10:59 a.m.
On Tue, Aug 13, 2013 at 10:46 AM, Lukas Lehner
That means ghc cannot infer the type. Is there a way how to # print flatten (List []) ? Or even more general, print [] without enforcing the type?
If you turn on the ExtendedDefaultRules extension ( `{-# LANGUAGE ExtendedDefaultRules #-}` pragma or `-X ExtendedDefaultRules` ghc option), ghc will infer () for the type just as ghci does. Note that this reduces type safety a bit, since ghc will now accept programs that have what otherwise would be type errors. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net