Infix type and function definitions

Henrik Nilsson nhn at Cs.Nott.AC.UK
Fri Apr 18 05:41:30 EDT 2008


Simon PJ wrote (Re: BangPatterns: probably accept ==> undecided):

 > Not allowing infix functions on the LHS would be a notable
 > simplification.

And a little later (Re: Infix type constructors):

 > What we *want* is to say
 >         data a + b = Left a | Right b
 > That is, we want to define the type *constructor* (+)

Just to clarify, issues of what names can be used for
type constructors aside, are you proposing dropping
infix syntax for defining functions, but retaining infix
syntax for defining types (and type families etc.)?

Or would the last example have to be written

    data (+) a b = Left a | Right b


All the best,


Henrik Nilsson
School of Computer Science
The University of Nottingham
nhn at

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

More information about the Haskell-prime mailing list