Opened 10 years ago

Last modified 19 months ago

#108 new feature

Support infix operator definitions

Reported by: benl Owned by: steggles
Priority: low Milestone: _|_
Component: Source Parser Version: 0.4.1
Keywords: Cc:

Description (last modified by benl)

We don't support infix definitions like:

f ++ g = ...

All operators must be define in prefix style like:

(++) f g = ...

I'm not sure it's a good idea to support the infix definition style, because GHC had problems with it when they introduced bang patterns. For example:

f ! x = ...

It that supposed to be a definition of the operator (!) or, the definition of a function "f" which is strict in its argument?

We may well want to support bang patterns or something similar in the future, so we're avoiding infix definitions for now.

Change History (7)

comment:1 Changed 10 years ago by benl

  • Component changed from Build System to Source Parser

comment:2 Changed 9 years ago by steggles

  • Owner set to steggles

comment:3 Changed 7 years ago by benl

  • Version 0.1.2 deleted

comment:4 Changed 7 years ago by benl

  • Description modified (diff)
  • Priority changed from project to low

comment:5 Changed 6 years ago by benl

  • Version set to 0.4.1

comment:6 Changed 6 years ago by benl

  • Summary changed from No support for infix operator definitions to Support infix operator definitions

comment:7 Changed 19 months ago by benl

  • Type changed from enhancement to feature
Note: See TracTickets for help on using tickets.