Errata

Real World Haskell

Errata for Real World Haskell

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 "Date 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 Note Update

Version Location Description Submitted By Date submitted Date 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  Dec 03, 2008  May 01, 2009
Other Digital Version
ch01s07

In ePub version, the first code sample is formatted without line breaks:

Is:

ghci> :set +tghci> 'c'
'c'
it :: Char
ghci> "foo"
"foo"
it :: [Char]

Should be:

ghci> :set +t
ghci> 'c'
'c'
it :: Char
ghci> "foo"
"foo"
it :: [Char]


kuu  Jan 07, 2009  Oct 01, 2010
Other Digital Version
1.3.3
first paragraph under section1.3.3

True is misspelled as "TRue" .....

"1.3.3. Boolean Logic, Operators, and Value Comparisons

The values of Boolean logic in Haskell are TRue and False. The capitalization of these names is important."


ironic that "capitalization of these names is important" following a typo.

Anonymous  Jun 21, 2010  Oct 01, 2010
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  Dec 12, 2008  May 01, 2009
Printed
Page 8
in the line before the "(e ** pi) - pi" code example

in "we use the(**)" there is a space missing, should read "we use the (**)"

Gabor Greif  Apr 12, 2009  Jan 29, 2016
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  Dec 17, 2008  May 01, 2009
PDF
Page 10
2nd to last line

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

John Goerzen
 
Apr 07, 2009  May 01, 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  Dec 13, 2008  May 01, 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  Jan 11, 2009  May 01, 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
 
Apr 07, 2009  May 01, 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  Dec 15, 2008  May 01, 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  Dec 14, 2008  May 01, 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  Jan 04, 2009  May 01, 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  Feb 27, 2009  May 01, 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  Jan 11, 2009  May 01, 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  Jan 11, 2009  May 01, 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  Jan 11, 2009  May 01, 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  Jan 04, 2009  May 01, 2009
Printed
Page 70
exercise 7

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

Anonymous  Dec 03, 2008  May 01, 2009
Printed
Page 71
bottom of page, 2nd comment in code...

The comment is incorrect, it is listed as:
'-- Save this in a source file, e.g., Interact.hs'

This should be InteractWith.hs...since the actual file is InteractWith.hs...

patrick lynch  Jan 24, 2011  Jan 29, 2016
Printed
Page 75
1st code sample

"-- file: ch04/SplitLines.hs" should be
"-- file: ch04/FixLines.hs".

Note from the Author or Editor:
"let�s call the new file FixLines.hs."

should be:

"let�s call the new file SplitLines.hs."

since the file in the examples is called splitlines.

HARUYAMA Seigo  Dec 25, 2008  Jan 29, 2016
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  Jan 17, 2009  May 01, 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  Dec 30, 2008  May 01, 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  Dec 17, 2008  Jan 29, 2016
Printed
Page 98
Exercise 9

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

J.A.Zaratiegui  Dec 21, 2008  Jan 29, 2016
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  Dec 23, 2008  Jan 29, 2016
Printed
Page 101
First paragraph. Second sentence.

"Iin fact" instead of "In fact"

Jeff Heon  Feb 10, 2009  Jan 29, 2016
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  Dec 26, 2008  Jan 29, 2016
Printed
Page 107
1st paragraph

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

Thorsten Seitz  Jan 04, 2009  Jan 29, 2016
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  Feb 05, 2009  Jan 29, 2016
Printed
Page 111
third paragraph

"value" should be "values"

Peter Michaux  Jul 05, 2009  Jan 29, 2016
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  Mar 22, 2009  Jan 29, 2016
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  Mar 27, 2009  Jan 29, 2016
Printed
Page 137
4th line from bottom

class name BasicEq is separated as
... Basi
cEq ...

Gabor Greif  Jun 18, 2009 
Printed
Page 144
Bottom of page

"It allows us to define your own numeric types" -- I don't want _you_ defining _my_ types, thanks very much! (So "us" -> "you"?).

Note from the Author or Editor:
"us" should be "you"

david.m.carter  Apr 11, 2009  Jan 29, 2016
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  Dec 04, 2008  Jan 29, 2016
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  Feb 06, 2009 
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  Jan 05, 2009  Jan 29, 2016
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  Jan 02, 2009  Jan 29, 2016
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  Jan 02, 2009  Jan 29, 2016
Printed
Page 197
Last paragraph

"Strig" instead of "String" in the following sentence:
"...followed by any capitalization of the strig .png."

Jeff Heon  Apr 29, 2009  Jan 29, 2016
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  Jan 04, 2009  Jan 29, 2016
Printed
Page 240
end of 5th para

"the runParser accessor" should be "the runParse accessor"

david.m.carter  May 10, 2009  Jan 29, 2016
Printed
Page 260
footnote

"We can disregard for now" -- need "this" or "it" after "disregard".

david.m.carter  May 10, 2009  Jan 29, 2016
Printed
Page 266
penultimate para of text

"It marked up in bold yellow". Need "is" after "It"; and also, there is no yellow in the printed book, so putting this after "see Figure 11-2" is a little confusing!

david.m.carter  May 10, 2009  Jan 29, 2016
Printed
Page 271
1st code sample

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

HARUYAMA Seigo  Jan 12, 2009  Jan 29, 2016
Printed
Page 321
5th paragraph (above 4th code sample)

The sentence "Let's try our the methods of the Monoid typeclass" is wrong.

I believe the author meant "Let's try out the methods" ....

Rodney S  Jul 16, 2009  Jan 29, 2016
Printed
Page 375
Last paragraph

"Let's say that we would like guarantee to ourselves that a piece of code ..."

Probably should be "we would like a guarantee" or "we would like to guarantee".

Rodney S  Jul 19, 2009  Jan 29, 2016
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  Jan 12, 2009  Jan 29, 2016
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  Mar 04, 2009  Jan 29, 2016
Printed
Page 441
2nd paragraph from the bottom under "Transformer Stacking Order Is Important"

the paragraph starts "Fromour early examples"

There needs to be a space between "From" and "our"

Rodney S  Jul 24, 2009  Jan 29, 2016
Printed
Page 454
Note on version 6.10.1 of GHC.

Instead of "It introduces an extensible extension system.", it should read "It introduces an extensible exception system.".

Michel Rijnders  Jul 13, 2009  Jan 29, 2016
Printed
Page 469
2nd paragraph besides the paw prints

"That could got also be written as ...." I think the "got" should be removed.

Rodney S  Jul 29, 2009  Jan 29, 2016
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  Feb 02, 2009  Jan 29, 2016
Printed
Page 591
Paragraph below the one at the middle, explaining when to use what hash


There is a typo in the phrase:

Since hashWord32 is the faster of the two hashing functions, we call it if our data is a multiple of 4 bytes in size; otherwise, we call hashLittle2.

'hashWord32' should really be 'hashWord2'

David Fries  Sep 20, 2009  Jan 29, 2016
Printed
Page 604
para just below the long code listing

"Out timed action ensures that a value is evaluated ...."

Should be "Our timed action ...".

Rodney S  Aug 03, 2009  Jan 29, 2016