Iavor Diatchki writes:
> It appears that Hugs (20050909) does not deal correctly with
> existentials and multi-parameter type classes:
>
> > class C a b where
> > f :: a -> b
> >
> > data T b = forall a. C a b => T a
> >
> > test (T a) = f a
>
> Hugs accepts this program, inferring the following type for 'test':
> Main> :t test
> test :: C _5 a => T b -> a
> Main> :t test (undefined :: T Char)
> test undefined :: C (T Char) a => a
The same bug shows without multi-parameter type classes: Hugs accepts
data T = forall a. C a
test (C x) = toInteger x
Now fixed in CVS.
_______________________________________________
Hugs-Bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hugs-bugs