Re: [Haskell-cafe] Infix instance headers

OK thanks,
Bas
On Wed, Dec 23, 2009 at 10:50 AM, Simon Peyton-Jones
Ah I see. It's an oversight. Thank you for pointing that out.
I'll fix it, but it'll be in the HEAD not 6.12.
Simon
| -----Original Message----- | From: Bas van Dijk [mailto:v.dijk.bas@gmail.com] | Sent: 22 December 2009 10:52 | To: Simon Peyton-Jones | Subject: Re: [Haskell-cafe] Infix instance headers | | On Tue, Dec 22, 2009 at 9:53 AM, Simon Peyton-Jones |
wrote: | > works for me. what version of GHC are you using? | | ghc-6.12.1 | | Sorry, maybe I wasn't totally clear. The example I posted works but if | you write the class name in the instance header as infix I get a | "Malformed instance header" error. | | So the following doesn't work: | | class (Monad pr, Monad cr) => pr `ParentOf` cr | | instance Monad r => r `ParentOf` r | | instance ( Monad cr | , cr `TypeCast2` RegionT resource s pcr | , pr `ParentOf` pcr | ) | => pr `ParentOf` cr | | regards, | | Bas

Simon, I discovered that the following example also won't parse in ghc-6.12.1 because of the infix 'MayOpen' constraint: with ∷ (Resource resource, MonadCatchIO pr) ⇒ resource → (∀ s. s `MayOpen` resource ⇒ RegionalHandle resource (RegionT s pr) → RegionT s pr α) → pr α Is this also fixed by your previous patch? regards, Bas
participants (1)
-
Bas van Dijk