Contents

1 The tutorial

-- insert here some horrible (for the non-Haskeller) long example-- something we can work through slowly (and show why we find it beautiful)

1.1 What the heck is xyz?

One problem you might face when reading Haskell code is figuring out some cryptic entity like xyz is.

1.1.1 Hint: order doesn't matter

Outside of a monad, it really doesn't matter what order things in Haskell code appear. So if you see something like this...

foo = whatTheHeckIsBar

you should take into account that whatTheHeckIsBar may be defined somewhere belowfoo

scope in a nutshell

except for monads? explain

1.1.2 Hint: use grep

(This might seem really obvious, but it's sometimes easy to forget)

Or use the search feature of your favourite text editor. It's probably defined right there before your eyes, and if it's true to Haskell style, the definition is probably so small you blew right through it. In vi, for example, you could do /= *xyz which searches for =, an arbirtary number of spaces, and then xyz.

Barring that, xyz might be defined in some different module in the code you downloaded. You can look for telltale signs like

import Manamana (xyz)

But note that sometimes programmers get lazy, and they don't specify that xyz should be imported. They just let rip with

import Manamana

So solution number 3 would be do something like
grep xyz *.lhs *.hs
(Note that literate programs sometimes use non-literate code, so search in both lhs AND hs)

A fourth idea, if you can't find something, is to look it up in Hoogle