Effective Haskell Chapter 8 "Viewing Text One Page at a Time"

In Chapter 8, the introduction to “Viewing Text One Page at a Time” (p. 358 in my ePub), the type signature for groupsOf after the text which says “… so we’ll use a polymorphic type” repeats the signature with the concrete type (groupsOf :: Int -> [Text.Text] -> [[Text.Text]]), instead of groupsOf :: Int -> [a] - [[a]]

In the description of getTerminalSize in the “Handling Terminal Dimensions” sub-section it says “We’re starting out looking at the current OS, and returning an error if we’re not running darwin or
linux”, but the code returns default screen dimensions of 25 rows by 80 columns.

The final version of runHCat in the “Paging Our File” sub-section has Text.hGetContents instead of TextIO.hGetContents

1 Like