• Iavor S. Diatchki's avatar
    Change -XTypeOperators to treat all type-operators as type-constructors. · 85926ae6
    Iavor S. Diatchki authored
    Previously, only type operators starting with ":" were type constructors,
    and writing "+" in a type resulted in a type variable.  Now, type
    variables are always ordinary identifiers, and all operators are treated
    as constructors.  One can still write type variables in infix form though,
    for example, "a `fun` b" is a type expression with 3 type variables: "a",
    "fun", and "b".
    
    Writing (+) in an import/export list always refers to the value (+)
    and not the type.   To refer to the type one can write either "type (+)",
    or provide an explicit suobrdinate list (e.g., "(+)()").  For clarity,
    one can also combine the two, for example "type (+)(A,B,C)" is also
    accepted and means the same thing as "(+)(A,B,C)" (i.e., export the type
    (+), with the constructors A,B,and C).
    85926ae6
Parser.y.pp 93.1 KB