From 0556eec2dae031213bb2cea5b743ba88e73d4094 Mon Sep 17 00:00:00 2001 From: Justin Bailey Date: Thu, 29 Apr 2010 16:38:57 -0700 Subject: [PATCH] Typos and updates for version 2.3. * 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 --- CheatSheet.cabal | 19 +++++++++++++----- CheatSheet.lhs | 43 +++++++++++++++++++++------------------- HaskellCheatSheet-JH.tex | 4 ++-- 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/CheatSheet.cabal b/CheatSheet.cabal index 8115294..add283a 100644 --- a/CheatSheet.cabal +++ b/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 Author: Justin Bailey 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: @@ -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 \ No newline at end of file diff --git a/CheatSheet.lhs b/CheatSheet.lhs index 9e25eeb..81a3ae8 100644 --- a/CheatSheet.lhs +++ b/CheatSheet.lhs @@ -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} @@ -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} @@ -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, @@ -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} @@ -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 diff --git a/HaskellCheatSheet-JH.tex b/HaskellCheatSheet-JH.tex index 47600e5..6a9f021 100644 --- a/HaskellCheatSheet-JH.tex +++ b/HaskellCheatSheet-JH.tex @@ -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}