Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Railroad diagrams for Haskell?

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.

like image 501
Stop Putin Stop War Avatar asked Nov 21 '12 02:11

Stop Putin Stop War


1 Answers

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

like image 87
ErikR Avatar answered Nov 04 '22 11:11

ErikR