[Haskell-cafe] Newbie Question on type constructors

Philippa Cowderoy flippa at flippac.org
Fri Oct 29 18:34:55 EDT 2004

On Fri, 29 Oct 2004, Brian Beckman wrote:

> This is a tiny question on the "data" syntax.


There's a significant difference between data constructors and ordinary
functions - you can't use pattern-matching to match an ordinary function.
In effect, data constructors are used not just to build values but also to
take them apart.

Syntactically speaking, data constructors must begin with a capital
letter, variables and function definitions with a lower case letter.

flippa at flippac.org

More information about the Haskell-Cafe mailing list