[Haskell-cafe] [ANN] Haskell Cheatsheet v1.0
holgersiegel74 at yahoo.de
Sat Oct 11 08:30:50 EDT 2008
On Saturday 11 October 2008 01:08:15 Justin Bailey wrote:
> This is a beta release (which is why I've limited the audience by
> using hackage) to get feedback before distributing the PDF to a wider
> audience. With that in mind, I welcome your comments or patches.
>  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CheatSheet
>  git://github.com/m4dc4p/cheatsheet.git
Some minor issues:
- sometimes it is a bit verbose for a cheatsheet; for example the reference to
language C in the section about the layout rule.
- in the section about strings, you give an example of a syntax error; it
would be sufficient to show what is right.
- in the section about operator precedence you define 'div1' to be right
associative. Instead, you could show where right associativity is actually
useful (>>=, ...).
- The explanation of the layout rule is wrong. If you define more than one
value in a let declaration, then it is only required that the identifiers
start on the same column.
- When I started to learn Haskell, I had problems with the use of (.) and ($).
I had learned what function application and lambda abstractions look like, but
then I looked at Haskell code written by experienced Haskellers and found
expressions like (map (succ . succ) $ 1:xs) that I did not understand.
A small section describing how to read such expressions could be useful for
- the section about do-notation is more a mini-tutorial than a cheatsheet.
Instead, you could show two or three examples that demonstrate how do-
notation, list comprehensions and the operator >>= relate. That is what I had
to look up more than once until I got used to it. There is also an example of
what is wrong, where showing the right thing would have sufficed.
More information about the Haskell-Cafe