Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By Corrected
Printed Page xxxvii
last line

The name "Lauren?iu Nicola" is not formatted correctly in the book. Where I've written a '?', there is the sort of empty box one typically sees when a font is missing a particular Unicode character.

Checking the online book, the correct version of the name appears to be "Laurențiu". One fix would be to transliterate it to "Laurentiu".

Anonymous  May 2009
Printed Page 3
1st paragraph

There's a space missing between the word "prelude" and "is" in this sentence:
"The Prelude moduleis sometimes..."

Jeff Heon  May 2009
Printed Page 10
7th paragraph (code samples not counted as paragraphs)

Starting the paragraph, there is the reference:
'In the latter case, the list...'
But the comment about the endpoint being missed does not apply to latter, but to second case:
'In the second case, the list...'

J.A.Zaratiegui  May 2009
PDF Page 10
2nd to last line

Instead of "hit C to halt", it should read "hit Ctrl-C to halt"

John Goerzen
O'Reilly Author 
May 2009
Printed Page 12
About the 4th paragraph

There's an extra 'S' following the quotes in the following:

The empty string is written ""S, and is a synonym for []

Jeff Heon  May 2009
Printed Page 16
exercise 3

exercise 3 states that "the words function counts the number of words in a string".

I found this confusing as I interpreted this to mean it returns a count, but it really returns a list of the words in a string which you then can count.

I think the question would make more sense if it followed the wording of the help for "words" which says "words breaks a string up into a list of words, which were delimited by white space"





Note from the Author or Editor:
Change first sentence in exercise 3 to read:

The words function breaks a string up into a list of words.

Richard Kennedy  May 2009
Printed Page 26
1st line under "Passing an Expression to a Function"

There should be a space between "In Haskell," and "function".

Thanos Tsouanas  May 2009
PDF Page 32
Third paragraph under Lazy Evaluation

"Then apply the odd function" should read "Then apply the isOdd function".

isOdd should remain in code font.

John Goerzen
O'Reilly Author 
May 2009
Printed Page 42
First paragraph

There is a capital letter 'T' instead of the word String in the following sentence:
"In this example, the Int represents a book's identifier (e.g. in a stock database), T represents its title, and [String] represents the names of its authors."

Jeff Heon  May 2009
Printed Page 43
first paragraph after "Naming Types and Values"

Text states: "When we introduced the type BookStore",
"BookStore" should be "BookInfo".

Should read: "When we introduced the type BookInfo".

Terry Michaels  May 2009
Printed Page 43
3rd paragraph, 5th paragraph

3rd paragraph: "... a new value of type BookStore" should read "BookInfo" instead of "BookStore"

5th paragraph: two more occurrences of "BookStore" instead of "BookInfo" (one was already submitted by Terry Michaels).

Thorsten Seitz  May 2009
Printed Page 43
First paragraph in section "Naming Types and Values"

The paragraph starts with "When we introduced the type Bookstore...". This should read "When we introduced the type BookInfo...". Later in the sentence "...the type constructor Bookstore..." should read "...the type constructor BookInfo...". Bookstore is the name of the Haskell source code file, not of the type being referred to.

Jorge Phillips  May 2009
Printed Page 45
2nd code block

The two last lines of this code block should be missing. They serve no purpose. We already know that "it" stays the same if an error occurs.

Note from the Author or Editor:
Remove last two lines of second code block.

Thanos Tsouanas  May 2009
Printed Page 47
4th line under "Analogues to Algebraic..."

The book reads:
"to concepts that might be more familiar easier to understand"

Missing:
An "and/or" (better to use just "or") between "familiar" and "easier".

Note from the Author or Editor:
Add "or" between "familiar" and "easier".

Thanos Tsouanas  May 2009
Printed Page 47
2nd line from the bottom

Should read "Book" instead of "BookStore".

Note from the Author or Editor:
Change "fields of a BookStore" to "fields of a BookInfo".

Thanos Tsouanas  May 2009
Printed Page 67
2nd paragraph

wrong word, whether should be when in "followed by an expression to evaluate whether that pattern matches."

Note from the Author or Editor:
Change "evaluate whether" to "evaluate if".

Warren Ferguson  May 2009
Printed Page 70
exercise 7

Exercise 7 should consist of two paragraphs. However, the second paragraph is incorrectly labeled as excercise 8.

Anonymous  May 2009
Printed Page 75
2nd line under "A Line-Ending Conversion Program"

Instead of Interact.hs, this should be InteractWith.hs, or the previous instances should also be Interact.hs.

Thanos Tsouanas  May 2009
Printed Page 85
2nd code listing

Incorrect comment:

import Data.Char (digitToInt) -- we'll need ord shortly

should read:

import Data.Char (digitToInt) -- we'll need digitToInt shortly

Johan Tibell  May 2009
Printed Page 98
3rd line of code listing for Exercise 4

The line as printed reads "asInt_either :: String -> Ei". It looks like the line is truncated, and should read "asInt_either :: String -> Either ErrorMessage Int" judging by the type def above and the output shown below.

David Stelter 
Printed Page 98
Exercise 9

What is numbered as Exercise 9 is only part of Exercise 8

J.A.Zaratiegui 
Printed Page 98
Exercises 2 and 6

Exercise 2 is only part of Exercise 1
Exercise 6 is only part of Exercise 5

Note from the Author or Editor:
Make what is labeled as exercise 2 be additional paragraphs for exercise 1.

Ditto for exercise 6 and 5.

Renumber exercises as appropriate afterwards.

J.A.Zaratiegui 
Printed Page 98
Exercise 4

The signature of the function asInt_either is given as:

asInt_either :: String -> Ei

The complete signature should probably be something along the lines of:

asInt_either :: String -> Either ErrorMessage Int

David Fries 
Printed Page 101
First paragraph. Second sentence.

"Iin fact" instead of "In fact"

Jeff Heon 
Printed Page 105
6th paragraph

Drop plural "s" from "begins" in "Count the number of words in a string that begins with a capital letter[.]"

Stephan Bergmann 
Printed Page 107
1st paragraph

The text states "... the result of drop 1 . words ..."
It should read "... the result of tail . words ..."

Thorsten Seitz 
Printed Page 110
last sentence in 1st paragraph

"... the definition of foldl' just shows illustrates how ..." should be either "just shows" or "illustrates" but not both.

Note from the Author or Editor:
Change "fold' just shows illustrates how" to "fold' illustrates how"

enoksrd 
Printed Page 117
2nd paragraph, 2nd sentence

The sentence reads:

"As such a programmer, we're...."

That's a type mismatch. "a programmer" <--> "we're

The sentence should read:

"As such programmers, we're ..."

7stud 
Printed Page 133
3) at bottom of page

The text reads,

3) If this succeeds, we can install the package....

But the command to install the package isn't shown. For steps 1) and 2) a command is given. Did the command for 3) get cut off the bottom of the page?

Note from the Author or Editor:
After "we can install the package", add "by running runghc Setup install"

7stud 
Printed Page 145
table 6-1

In "[-2^29..2^29-1]", the exponents are not displayed as a superscript. While the text as written is valid Haskell code, it also is not written in the font used for code. One or the other should be done.

Note from the Author or Editor:
Should be in code font.

Anonymous 
Printed Page 148
table at top of page

All occurrences of "truncate" in the table are marked with an asterisk to indicate that there's a corresponding footnote, but the footnote is labeled with "a" instead. The title of the table does refer to the "a" footnote. The HTML version of the book (correctly?) uses the asterisk to label the footnote, and does away with the "a" reference in the table title.

enoksrd 
Printed Page 165
listing of basicio.hs

The online version of the book has comments by readers stating that the operator ($) has been used, but not explained. I look in the index for "$" and don't find it, and suggest that newbies might not know to look for "($)" which gives you a reference to page 248 -- a reference many pages after where $ is used.

Note from the Author or Editor:
Please add to page 144 after its use of $, as well as to page 165 after its use of $, the following note box, which should be reproduced identically on both pages:

"The $ operator is a bit of syntactic sugar that is equivalent to putting everything after it inside a pair of parenthesis."

At least one of these instances should be added to the index.

Warren Ferguson 
Printed Page 195
Las paragraph

Your reference to the 'fourth comma-separated column' might be OK in some programming environments, but it is really the FIFTH comma-separated column, although it is accessed by (!!4)

Note from the Author or Editor:
Change "fourth comma-separated" to "fifth comma-separated".

J.A.Zaratiegui 
Printed Page 197
Section "Filename Matching", 1st para

At the end of sentence "Many systems-oriented...": parenthesis is closed, but never opened.

Note from the Author or Editor:
Delete parenthesis after "fnmatch".

Jan Snajder 
Printed Page 199
8th and 9th samples ([String])

When you use regex-base-0.93.1 (Debian sid package: libghc6-regex-posix-dev (0.93.1-1)),

'"I, B. Ionsonii, uurit a lift'd batch" =~ "(uu|ii)" :: [String]'
causes an error because of an incompatibility of versions.

See
http://www.haskell.org/ghc/docs/latest/html/libraries/regex-base/Text-Regex-Base-RegexLike.html#t%3ARegexContext
and
http://hackage.haskell.org/packages/archive/regex-base/0.93.1/doc/html/Text-Regex-Base-RegexLike.html#t%3ARegexContext

'"I, B. Ionsonii, uurit a lift'd batch" =~ "(uu|ii)" :: [[String]]' returns
'[["ii","ii"],["uu","uu"]]' when you use regex-base-0.93.1.

Note from the Author or Editor:
Can we add a footnote or note box after the example immediately before "Watch out for String results"? It should read:

"Some versions of regular expression support in Haskell do not support [String] and [[String]] return values from pattern matching."

HARUYAMA Seigo 
Printed Page 271
1st code sample

"import Parse -- from chapter 11" should be
"import Parse -- from chapter 10".

HARUYAMA Seigo 
PDF Page 396
first paragraph (under "Reading the laws")

in "...the left of the == is equivalent to...", it should be ===, not ==

Note from the Author or Editor:
NOTE: PAGE NUMBER IS 356, NOT 396

sethtisue 
Printed Page 407
penultimate paragraph in "Foreign Language Bindings: The Basics"

There's a duplicate "with" in the phrase:

At best this will lead to C compiler warnings, and more likely, it will end with with a runtime crash.

Note from the Author or Editor:
Change "it will end with with a runtime crash" to "it will end with a runtime crash".

David Fries 
Printed Page 513
second paragraph of "Downloading" section

book reads: "We'll use a Haskell see HTTP library"

The word "see" should not be present, and was somehow introduced
due to a link to the library being involved.

Joey Hess 


"...this book will expand your mind. It will give you a new way of thinking about the whole enterprise of programming: when you have worked through these pages, you'll write better code in your current favourite language."
--Simon Peyton Jones, Microsoft Research, Haskell language architect and designer of the Glasgow Haskell Compiler