RE: Type-checker bug related to implicit parameters.
GHC 5.02 works fine for this program. We're going to release it this week. Thanks for the test -- I've added it to our test suite! Simon | -----Original Message----- | From: John Hughes [mailto:rjmh@cs.chalmers.se] | Sent: 19 September 2001 18:00 | To: hugs-bugs@haskell.org | Subject: Type-checker bug related to implicit parameters. | | | | 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 | | _______________________________________________ | Hugs-Bugs mailing list | Hugs-Bugs@haskell.org | http://www.haskell.org/mailman/listinfo/hugs-bugs |
participants (1)
-
Simon Peyton-Jones