[Haskell-cafe] Infix instance headers
Bas van Dijk
v.dijk.bas at gmail.com
Wed Dec 23 08:00:50 EST 2009
On Wed, Dec 23, 2009 at 10:50 AM, Simon Peyton-Jones
<simonpj at microsoft.com> wrote:
> 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.
> | -----Original Message-----
> | From: Bas van Dijk [mailto:v.dijk.bas at 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
> | <simonpj at microsoft.com> 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
More information about the Haskell-Cafe