| 1 | | GHC allows type constructors to be infix operators (conops, beginning with {{{:}}}, but not including {{{:}}} itself). This is a straightforward generalisation, doesn't break any existing code, and improves the consistency of the syntax. |
| 2 | | |
| 3 | | Changes to the syntax may depend on whether CompositionAsDot is adopted, but roughly speaking we add |
| 4 | | |
| 5 | | {{{ |
| 6 | | qtycon -> qconid | ( qconsym ) |
| 7 | | qtyconop -> qconsym | ` qconid ` |
| 8 | | }}} |
| 9 | | |
| 10 | | And {{{type}}} gets an extra production: |
| 11 | | |
| 12 | | {{{ |
| 13 | | type -> btype qtyconop type |
| 14 | | }}} |
| 15 | | |
| 16 | | (modulo FixityResolution). Also, there are obvious changes to the grammar for {{{type}}}, {{{data}}}, and {{{newtype}}} declarations. |
| | 1 | see InfixTypeConstructors. |