[Hugs-bugs] existentials
29 Oct
2005
29 Oct
'05
8:35 p.m.
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.
7522
Age (days ago)
7522
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ross Paterson