Type class inference trouble
Sat, 17 Feb 2001 01:29:05 -0500
Content-Type: text/plain; charset=us-ascii
On 2001-02-16T07:56:42+0000, Marcin 'Qrczak' Kowalczyk wrote:
> > > test2 =3D apply [int 3] (apply [(+)::Int->Int->Int] [int 5])
> The monomorphism restriction bites again. A variable binding without
> a type signature is monomorphic...
But, but, but... The type *is* monomorphic, in the sense that it can
only be test :: Int, test2 :: [Int]... *sob*
Then again, this is a conclusion that can only be reached after
dependencies in type classes are taken into account. Given that
dependencies are an experimental feature, does this count as a bug?
Or should the monomorphism restriction be taken to mean, as Hugs seems
to do, "monomorphism after unification, as in standard Haskell"?
> ghc and nhc98 can be told to ignore the monomorphism restriction.
Edit this signature at http://rodimus.digitas.harvard.edu/cgi-bin/ken/sig
"The day Microsoft makes something that doesn't suck is probably the day
they start making vacuum cleaners" - Ernst Jan Plugge
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----