19 Sep
2001
19 Sep
'01
5 p.m.
Hugs -98 (Feb 2001) rejects the following program (which should be well-typed)
foo :: ((?x :: Int) => b) -> Int -> b foo s z = s with ?x = z
with the message ERROR Bug.hs:2 - Inferred type is not general enough *** Expression : foo *** Expected type : ((?x :: Int) => a) -> Int -> a *** Inferred type : ((?x :: Int) => a) -> Int -> Int It seems to unify the type of the implicit parameter with the type of the result. GHC accepts this program (but generates wrong code). John Hughes