8 Apr
2001
8 Apr
'01
10:07 a.m.
In Hugs 98 Feb2001 (as hugs -98), this piece of code gives an error: -- class X a b | a -> b where x :: a; class (X a b) => Y a b | a -> b where y :: a; instance (X a b) => Y a b where y = x; instance (Num a) => X a a where x = 0; -- line A --instance X Int Int where x = 0; -- line B -- Reading file "Bug.hs": Type checking ERROR Bug.hs:3 - Inferred type is not general enough *** Expression : y *** Expected type : Y a b => a *** Inferred type : Y a a => a However, if I replace line A with line B, it compiles. Is this correct, or is it a bug in Hugs? Sooner or later I should install GHC for Mac OS X... -- Ashley Yakeley, Seattle WA
9273
Age (days ago)
9273
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ashley Yakeley