|Version 1 (modified by ross@…, 10 years ago) (diff)|
Infix Type Constructors
GHC allows type constructors to be infix operators (conops, beginning with :, but not including : itself).
Changes to the syntax may depend on whether CompositionAsDot is adopted, but roughly speaking we add
qtycon -> qconid | ( qconsym ) qtyconop -> qconsym | ` qconid `
And type gets an extra production:
type -> btype qtyconop type
(modulo FixityResolution). Also, there are obvious changes to the grammar for type, data, and newtype declarations.
- Infix type constructors, classes, and type variables in the GHC User's Guide.
- Add infix type constructors
- This is a straightforward generalisation, doesn't break any existing code, and improves the consistency of the syntax.