Mon, 28 May 2001 17:53:38 -0700, Juan Carlos Arevalo Baeza <[EMAIL PROTECTED]> pisze:
> Uncommenting the type expression above clears the error.
> But, why can't the compiler deduce it by itself?
Monomorphism restriction strikes again. See section 4.5.5 in the
Haskell 98 Report. A pattern binding without an explicit type signature
is considered monomorphic (must resolve to a simgle non-overloaded
type) and points of usage or defaulting rules for numeric types
determine the type (neither applies here).
IMHO monomorphism restriction should be removed (the case for bindings
of the form var = expr without type signature).
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe