
4 Mar
2010
4 Mar
'10
1:53 a.m.
I am trying to understand the mechanism behind -- why does the first example compile and what constraints does enumerateMethodNames add on a (which it does not inspect)?
enumerateMethodNames does not add on any constraints. If you don't actually use "methods" GHC does not care what it's type is but the moment you use it some place the compiler needs to infer it's type which it is unable to do in your case because the "undefined"s can be of any type. HTH Rahul