Ticket #1727 (new bug)

Opened 2 years ago

Last modified 3 months ago

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

Reported by: pat@jantar.org Assigned to:
Priority: normal Milestone: 6.12 branch
Component: Compiler (Parser) Version: 6.6.1
Severity: minor Keywords:
Cc: Difficulty: Unknown
Test Case: Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

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.

Change History

09/23/07 07:02:00 changed by igloo

  • milestone set to 6.10 branch.

09/24/07 00:53:01 changed by simonpj

See also #1702 (fix both at the same time).

09/30/08 08:37:23 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:30 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.

04/11/09 17:17:32 changed by igloo

  • milestone changed from 6.10 branch to 6.12 branch.