[Haskell-cafe] Re: Haskell Quick Reference (1-page PDF)

Benjamin L.Russell DekuDekuplex at Yahoo.com
Fri Nov 7 01:29:03 EST 2008


The reference includes both pairs and triples under "Tuples," but only
pairs under "Bigger types."  You may wish to add the following example
under "Bigger types":

(a, b, c)     triple of types a, b, and c (a, b, and c are type
variables)

Also, the examples under "Tuples" suggest that only pairs and triples
are valid tuples, but in fact, n-tuples, where n is any positive
integer other than 1, are valid tuples as well.  You probably don't
need to document the fact that 1-tuples are trivially isomorphic to
values in parentheses, but you may wish to include the following line
there (the specification of the range for the values of n being
optional):

(x1, x2, ..., xn)     an n-tuple of values (n = 0 or n > 1)

Accordingly, you may also wish to add the following corresponding line
under "Bigger types" (again, the specification of the range for the
values of n being optional):

(a1, a2, ..., an)     n-tuple of types a1, a2, ..., an (a1, a2, ...,
an are type variables, n = 0 or n > 1)

-- Benjamin L. Russell

On Thu, 6 Nov 2008 13:41:13 +0000, Malcolm Wallace
<Malcolm.Wallace at cs.york.ac.uk> wrote:

>Some time ago, there was a thread about a "CheatSheet" for Haskell
>beginners.  As I recall, the CheatSheet was more than 12 pages long.
>
>For a Haskell tutorial I was running at a conference recently, I needed
>a "Quick Reference Guide" that would fit onto a single side of A4.  So I
>knocked one together quickly, and it is attached as a PDF.  I send it to
>this list, with permission for anyone to distribute it more widely as
>they wish, in the hope that it might be useful.
>
>Doubtless it is incomplete, and I have no particular desire to fix
>errors or maintain this document, so if anyone is interested and would
>like to adopt it, I can pass on the editable sources.  It was originally
>created as an Apple Numbers spreadsheet (simply for speed of creation)
>but could be converted to Excel or CSV, for import into other tools.
>
>Regards,
>    Malcolm



More information about the Haskell-Cafe mailing list