At 16:50 17/03/2003 +1100, Bernard James POPE wrote:
You have struck the monomorphism restriction.

See:
http://research.microsoft.com/Users/simonpj/haskell98-revised/haskell98-report-html/decls.html#sect4.5.5

This is an often tripped over snag in Haskell 98's type system.

Ah, thanks. I'd read that, but didn't understand it's relevance.


(I'm still not sure I do: I guess the key gothcha here is the bit about
[[
Any monomorphic type variables that remain when type inference for an entire module is complete, are considered ambiguous, and are resolved to particular types using the defaulting rules ...
]]
meaning that a definition may need further qualification in different environments?)


#g


------------------- Graham Klyne <[EMAIL PROTECTED]> PGP: 0FAA 69FF C083 000B A2E9 A131 01B9 1C7A DBCA CB5E

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to