
24 Apr
2013
24 Apr
'13
2:39 p.m.
Daniel Fischer
The point is that the type class dictionary is required to use the class methods, and with a GADT, the dictionary is bundled with the constructor, so pattern-matching makes the dictionary available.
Not so with DatatypeContexts, hence the dictionary must be explicitly passed with the context on the function.
So is this more of an implementation issue? No "real" ill-typed programs will get through the type checker if the compiler could remember the type dictionary without pattern-matching or explicit context?