[Haskell-beginners] print []

Lukas Lehner lehner.lukas at gmail.com
Tue Aug 13 16:46:04 CEST 2013


Hello,

This code runs ok http://lpaste.net/91814 but only thanks to enforcing [()]
on line 12.

In GHCI
*Main> :t (List [])
(List []) :: NestedList a

and

*Main> :t flatten (List [])
flatten (List []) :: [a]

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?


Thank you
Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130813/e5e5c600/attachment.htm>


More information about the Beginners mailing list