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
 http://www.hck.sk/users/peter/HaskellEx.htm
... gives you
 http://www.hck.sk/users/peter/HaskellEx.htm#topdecl
... and from there you can quickly find relevant part of Haskel report:
 http://www.haskell.org/onlinereport/decls.html#sect4.2.1

Haskell has a nice html specification online (thanks for it!).

Peter.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to