[Haskell-cafe] Infix instance headers

Bas van Dijk v.dijk.bas at gmail.com
Mon Dec 21 16:33:12 EST 2009


What's the reason that infix class declarations and infix constraints
are supported but infix instance heads aren't?

For example the following code from my regions package is allowed but
writing the instance header infix results in a "Malformed instance
header" error:

class (Monad pr, Monad cr) => pr `ParentOf` cr

instance Monad r => ParentOf r r

instance ( Monad cr
         , cr `TypeCast2` RegionT resource s pcr
         , pr `ParentOf` pcr
         => ParentOf pr cr



More information about the Haskell-Cafe mailing list