
That I understand. My question is that I have to enforce the type that specific way (don't want to use ExtendedDefaultRules) or is there some more generic way? On Wed, Aug 14, 2013 at 12:08 PM, David Virebayre < dav.vire+haskell@gmail.com> wrote:
2013/8/13 Lukas Lehner
: Good to know extension. And without it?
Someone correct me if I'm wrong, here's how I understand it:
To execute print [], ghc has to find which instance of Show to call. How could it find an instance without knowing the type ? [] could be a list of anything, and while in theory we know that in all cases it should print "[]", in practice ghc can't call that code if it doesn't know the type of the list.
David.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners