Skip to content

Precedence and associativity rules ignored when mixing infix type and data constructors in a single expression

The following code:

infixr 5 `Foo`
infixr 6 `Bar`

data a `Foo` b = a `FOO` a `Bar` b
data a `Bar` b = a `BAR` b

fails to compile, ignoring the fixity declarations. It should be parsed as a FOO (a Bar b) but currently the parentheses are required, which misses the point of fixity annotations.

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information