On Thu, May 04, 2006 at 02:00:33PM +0100, Simon Peyton-Jones wrote:
> Actually, it won't.  The spec just says that the function is monomorphic
> in 'a'.  That is, 'a' can be instantiated only one way.  So if f is
> called, say (f True True), then that fixes 'a' to be Bool and all is
> well.

Oops.  Still, if the class can have two parameters, I could define
Result (Maybe a) b = [b] instead of Bool and probably get a contrast
between polymorphism and monomorphism in b.

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to