Ticket #1702 (new bug)
type operator precedences don't work in contexts
| Reported by: | b.hilken@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 7.4.1 |
| Component: | Compiler | Version: | 6.8 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by simonpj) (diff)
Type contexts don't parse correctly when a type class is used infix. The following example:
> infixr 4 :=: > infixl 3 :+: > infix 2 `Disjoint` > > labelZip :: (n :=: a `Disjoint` m :=: b) > => n -> m -> [a] -> [b] -> [n :=: a :+: m :=: b]
gives the error:
Type constructor `:=:' used as a class
In the type `(:=: n (a Disjoint (m :=: b))) =>
n -> m -> [a] -> [b] -> [(n :=: a) :+: (m :=: b)]'
In the type signature for `labelZip':
labelZip :: (:=: n (a Disjoint (m :=: b))) =>
n -> m -> [a] -> [b] -> [(n :=: a) :+: (m :=: b)]
where the parenthesised version works.
Change History
Note: See
TracTickets for help on using
tickets.
