[Haskell-cafe] Re: Basic question concerning data constructors
phercek at gmail.com
Mon Dec 31 14:03:23 EST 2007
Joost Behrends wrote:
> We read
> data Pair a b = Pair a b
> in YetAnotherHaskellTutorial. And that is all ! If we omit "data" here, this
> would be a silly pleonasm. And no single word about this strange behavior of
> "data" in every tutorial i read.
When learning a language, I find it useful to consult grammar to find out
the relevant part of the syntax; then I can check the Haskell online
report for explanations.
For example you presented: ... searching for data in
... gives you
... and from there you can quickly find relevant part of Haskel report:
Haskell has a nice html specification online (thanks for it!).
More information about the Haskell-Cafe