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:[EMAIL PROTECTED]] | Sent: 19 September 2001 18:00 | To: [EMAIL PROTECTED] | 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 | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/hugs-bugs | _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs