[GHC] #4091: Parse error on curried context of instance declaration
GHC
cvs-ghc at haskell.org
Mon May 24 09:36:08 EDT 2010
#4091: Parse error on curried context of instance declaration
---------------------------------+------------------------------------------
Reporter: basvandijk | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.2 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Assume we have the following classes:
{{{
class C1 a; class C2 a; class C3 a; class C4 a
}}}
GHC allows you to write a type with an uncurried context, as in:
{{{
foo :: (C1 a, C2 b, C3 c) => a -> b -> c
}}}
It also allows you to write a type with a curried context, as in:
{{{
foo :: C1 a => C2 b => C3 c => a -> b -> c
}}}
However it is not allowed to use this curried style of contexts in
instance declarations, as in:
{{{
instance C1 a => C2 b => C3 c => C4 (SomeType a b c)
}}}
Is this intentional?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4091>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list