Ticket #4091 (new feature request)
Parse error on curried context of instance declaration
| Reported by: | basvandijk | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | Compiler | Version: | 6.12.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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?
Change History
Note: See
TracTickets for help on using
tickets.
