Anyone knows a book or a web-site that would feature a simple set of railroad diagrams for Haskell grammar?
Something like this but in English:
http://www.cs.uu.nl/wiki/pub/FP/CourseLiterature/haskellsyntax-main.pdf
"Simple" is the key word here. Formal BNFs are too cryptic to be used as a cheat sheet.
There is some BNF in the Haskell 2010 report (especially in the "Syntax" chapter):
http://www.haskell.org/onlinereport/haskell2010/
Note that most programs use language extensions which add syntax to the base Haskell language - e.g. the FunctionalDependencies extension. Also, GHC has added new syntax (most recently lambda-case / lambda-if). A list of syntactic extensions supported by GHC 7.6 (currently the latest) is available at:
http://www.haskell.org/ghc/docs/7.6-latest/html/users_guide/syntax-extns.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With