
14 Aug
2013
14 Aug
'13
6:08 a.m.
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.