|
RE: [Haskell-cafe] Control.Monad.Cont fun: msg#00138lang.haskell.glasgow.bugs
Ah I see. This is really a bug. GHC6.4 should accept the example. I've just fixed it. thanks for mentioning it. Simon | -----Original Message----- | From: Thomas Jäger [mailto:thjaeger@xxxxxxxxx] | Sent: 26 July 2005 13:38 | To: Simon Peyton-Jones | Cc: glasgow-haskell-bugs@xxxxxxxxxxx | Subject: Re: [Haskell-cafe] Control.Monad.Cont fun | | Basically, the pre-ghc6.4 way of doing scoped type variables breaks | down for higher-rank functions. For example | | foo :: (forall a. a -> b) -> b | foo (f :: forall a. a -> b) = f undefined :: b | | is accepted by ghc-6.2 but rejected by the current ghc with an error message | Couldn't match `forall a. a -> b' against `forall a. a -> b' | | Of course, in ghc-6.4 we don't need f's type annotation so this will work fine: | | bar :: forall b. (forall a. a -> b) -> b | bar f = f undefined :: b | | But I'm not aware of anything that will work simulateously for both versions. | | Thomas | | On 7/26/05, Simon Peyton-Jones <simonpj@xxxxxxxxxxxxx> wrote: | > Andrew, Thomas | > | > Can you send me a self-contained module that elicits the mysterious message (I agree that it is a | strange one)? Can you also include the variant that does work. | > | > Then I'll look into it. | > | > Thanks | > | > Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1245266 ] Runtime exception on Windows, possibly due to bit operations, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1245810 ] Random.StdGen slowness, SourceForge.net |
| Previous by Thread: | Re: [Haskell-cafe] Control.Monad.Cont fun, Thomas Jäger |
| Next by Thread: | [ ghc-Bugs-1245266 ] Runtime exception on Windows, possibly due to bit operations, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |