> class C a where
> ty :: a -> String
> instance (Num a) => C a where
> ty _ = "NUM"
> instance C Integer where
> ty _ = "Integer"
> Why GHC and NHC98 are more restrictive than Hugs?
The instances for (Num a=> a) and Integer overlap, and are therefore
forbidden by Haskell'98.
Hugs allows overlapping instances. So does GHC with a special flag
(-foverlapping-instances I think). nhc98 does not provide type-system
extensions to Haskell'98.
Regards,
Malcolm
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
- no non-typevariable in instance declarations Jos� Romildo Malaquias
- Re: no non-typevariable in instance declara... Malcolm Wallace
- Re: no non-typevariable in instance declara... Jos� Romildo Malaquias
- Re: no non-typevariable in instance declara... Marcin 'Qrczak' Kowalczyk
- Re: no non-typevariable in instance dec... Jos� Romildo Malaquias
- Re: no non-typevariable in instance declara... Jeffrey R. Lewis
- Re: no non-typevariable in instance dec... Jos� Romildo Malaquias
- Re: no non-typevariable in instance declara... Malcolm Wallace
- Re: no non-typevariable in instance dec... Jos� Romildo Malaquias
