<div dir="ltr">On Tue, Aug 13, 2013 at 10:46 AM, Lukas Lehner <span dir="ltr">&lt;<a href="mailto:lehner.lukas@gmail.com" target="_blank">lehner.lukas@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>That means ghc cannot infer the type.</div>

<div>Is there a way how to # print flatten (List []) ?</div><div>Or even more general, print [] without enforcing the type?</div></div></blockquote><div><br></div><div>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.</div>
</div><div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>