Skip to content

Commit

Permalink
Typos and updates for version 2.3.
Browse files Browse the repository at this point in the history
  * HaskellCheatSheet-JH.tex - Updates for May 2010 HCAR.
  * CheatSheet.cabal - Added source repository section; rolled version
  * CheatSheet.lhs - Fixed a typo; moved deriving section for better flow
  • Loading branch information
m4dc4p committed Apr 29, 2010
1 parent 2bc1ade commit 0556eec
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 27 deletions.
19 changes: 14 additions & 5 deletions CheatSheet.cabal
@@ -1,12 +1,12 @@
Name: CheatSheet
License: BSD3
License-File: LICENSE
Version: 2.2
Version: 2.3
Homepage: http://cheatsheet.codeslower.com
Maintainer: Justin Bailey <jgbailey@codeslower.com>
Author: Justin Bailey <jgbailey@codeslower.com>
Category: Help
Build-Depends: base >=3 && < 5, containers, directory
Cabal-Version: >= 1.6
Build-type: Simple
Synopsis: A Haskell cheat sheet in PDF and literate formats.
Description:
Expand All @@ -16,7 +16,16 @@ Description:
Data-files: CheatSheet.pdf, CheatSheet.lhs
Extra-Source-Files: CheatSheet.lhs, README

Executable: cheatsheet
Main-Is: Main.lhs
Hs-Source-Dirs: .
Executable cheatsheet
Main-Is: Main.lhs
Hs-Source-Dirs: .
Build-Depends: base >= 3 && < 5, containers, directory

Source-repository head
Type: git
location: git://github.com/m4dc4p/cheatsheet.git

Source-repository this
Type: git
location: git://github.com/m4dc4p/cheatsheet.git
tag: v2.3
43 changes: 23 additions & 20 deletions CheatSheet.lhs
Expand Up @@ -15,11 +15,12 @@

\usepackage{hyperref}
\usepackage[all]{hypcap} % Must be after hyperref
% \usepackage{setspace}
\hypersetup{colorlinks}

\pagestyle{fancy}
\fancyhf{}
\lfoot{\copyright\ 2009 Justin Bailey.}
\lfoot{\copyright\ 2010 Justin Bailey.}
\cfoot{\thepage}
\rfoot{\href{mailto:jgbailey@@codeslower.com}{\tt jgbailey@@codeslower.com}}
\renewcommand\footrulewidth{0.4pt}
Expand All @@ -38,6 +39,7 @@
\setlength{\columnsep}{18.0pt}
\setlength{\columnseprule}{0.4pt}
\begin{document}
% \doublespacing
\begin{multicols}{3}
\section*{\textsf{\LARGE Haskell Cheat Sheet\normalsize}}\label{preamble}

Expand Down Expand Up @@ -1022,20 +1024,6 @@ of the @Maybe@ type:
Finally, as explained elsewhere, these names can be used for pattern matching,
argument capture and ``updating.''

\sshd{Class Constraints}\label{class-constraints}

Data types can be declared with class constraints on the type variables, but
this practice is discouraged. It is better to hide the
``raw'' data constructors using the module system and instead export ``smart''
constructors which apply appropriate constraints. In any case, the syntax used
is:

> data (Num a) => SomeNumber a = Two a a
> | Three a a a

This declares a type @SomeNumber@ which has one type variable argument. Valid
types are those in the @Num@ class.

\sshd{Deriving}\label{deriving}

Many types have common operations which are tedious to define yet necessary,
Expand All @@ -1059,7 +1047,21 @@ of the @Maybe@ type:
> deriving (Read, Show)

It is a syntax error to specify @deriving@ for any other classes besides the
six given above.
seven given above.

\sshd{Class Constraints}\label{class-constraints}

Data types can be declared with class constraints on the type variables, but
this practice is discouraged. It is better to hide the
``raw'' data constructors using the module system and instead export ``smart''
constructors which apply appropriate constraints. In any case, the syntax used
is:

> data (Num a) => SomeNumber a = Two a a
> | Three a a a

This declares a type @SomeNumber@ which has one type variable argument. Valid
types are those in the @Num@ class.

\shd{Deriving}

Expand Down Expand Up @@ -1522,13 +1524,14 @@ of the @Maybe@ type:

My thanks to those who contributed patches and useful suggestions:
Dave Bayer, Paul Butler, Elisa Firth, Marc Fontaine, Brian
Gianforcaro, Cale Gibbard, Stephen Hicks, Kurt Hutchinson, Johan
Kiviniemi, Adrian Neumann, Barak Pearlmutter, Lanny Ripple, Markus
Roberts, Holger Siegel, Adam Vogt, Leif Warner, and Jeff Zaroyko.
Gianforcaro, Cale Gibbard, Andrew Harris, Stephen Hicks, Kurt
Hutchinson, Johan Kiviniemi, Adrian Neumann, Barak Pearlmutter,
Lanny Ripple, Markus Roberts, Holger Siegel, Adam Vogt, Leif Warner,
and Jeff Zaroyko.

\hd{Version}\label{version}

This is version 2.2. The source can be found at GitHub
This is version 2.3. The source can be found at GitHub
(\url{http://github.com/m4dc4p/cheatsheet}). The latest released
version of the PDF can be downloaded from
\url{http://cheatsheet.codeslower.com}. Visit CodeSlower.com
Expand Down
4 changes: 2 additions & 2 deletions HaskellCheatSheet-JH.tex
Expand Up @@ -8,8 +8,8 @@
experts.

The cheat sheet is distributed as a PDF and literate source file. It
can be downloaded from \url{http://cheatsheet.codeslower.com}. A
spanish translation is also available.
can be downloaded from \url{http://cheatsheet.codeslower.com}.
Spanish and Japanese translations can be found there as well.

\FurtherReading
\url{http://cheatsheet.codeslower.com}
Expand Down

0 comments on commit 0556eec

Please sign in to comment.