Haskell Cheat Sheet



Lists (i.e linked lists): most fundamentas data structure in Haskell; Store elements of the same type. (If you don't want this, use a tuple) Lists are defined entirely by recursion x:list defines a list where x is the first element and list is the rest of the list (which is itself a list). The: is an infix function that gets an element and a list and returns a list. Many other lens types are available. You can use a value of a more general type where a value of a more specific type is required. Some values are presented in this document with a more specific and less esoteric type than the more general and less common type they really have.

Learning Haskell is not easy. Stormworks: build and rescue download. Besides the syntax, concepts, and advanced types, there is a real lack of succinct, accessible references. As I learned Haskell I frequently wanted a quick reference for syntax, keywords and other language elements. The Haskell Report, while very thorough, wasn't quite it.

Haskell Operators Cheat Sheet

For that reason I've created this cheatsheet. It's intended for beginning to intermediate Haskell programmers to use as a quick-reference guide for syntax, keywords or other language issues. You can obtain it in four different ways:

  • Download directly in PDF format: CheatSheet.pdf
  • As a Haskell package on HackageDB.
    • After downloading, unpack the tarball and the PDF is inside.
  • Using cabal install with 'cabal install cheatsheet'. Afterwards, run the 'cheatsheet' program and it will tell you where the PDF is located.
  • The Haskell Cheatsheet from Amazon.com, formatted especially for the Kindle eReader.

The guide itself is written as a 'literate' Haskell file, meaning it is directly executable. That file is available when using the latter two options above.

CheatsheetCheat

Haskell Cheat Sheet

The source is hosted at http://github.com/m4dc4p/cheatsheet/tree/master and can be cloned from git://github.com/m4dc4p/cheatsheet.git.

Haddock Haskell Cheat Sheet

Artifact quest 2 - match 3 puzzle download. Jaime Soffer was kind enough to translate the Haskell Cheatsheet into Spanish! Totally accurate battle simulator. Just download CheatSheetEs.pdf from his GitHub repository.