Daan Leijen wrote:
Keean Schupke wrote:
No, closed classes are different, here we are talking about lazy
overlap resolution, so
if at _call_ time only one instance fits we choose it. Closing a class
is different.
A "closed class" directive however is an explicit specification that
makes the intention of the designer explicit in the program. Since
it would solve the puzzle in a rather elegant and explicit way, I
thought that it was interesting to mention.
Indeed, a closed directive would have been fine. But it's not really
necessary, the class is obviously closed because of not being exported.
But the type checker doesn't use this fact.
I find it somewhat anomalous that there is one unique way to give types
to my program, but that the type checker refuses to do it. :)
-- Lennart
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell