RE: recursive group context bug?

The Report says that the functions of a mutually recursive group must all have the same context. It's a bit of a funny rule, and it's more restrictive than absolutely necessary, but that's what Haskell says. I could work to lift the restriction in GHC, but it only seems to come up in toy programs, never in real ones. So it's low (very low) priority at the moment. Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Keean Schupke | Sent: 17 January 2005 13:52 | To: Carsten Schultz | Cc: Simon Marlow; glasgow-haskell-users@haskell.org | Subject: Re: recursive group context bug? | | This must be a bug then, because the following works! | | y :: Num a => a | y = fromIntegral (y::Int) | | >A simpler example might be: | > | > x :: Int | > x = y | > | > y :: Num a => a | > y = fromIntegral x | > | >I have not studied the report to see if this should be legal. | > | > | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (1)
-
Simon Peyton-Jones