Effective Haskell: Chapter 8 errata and suggestions

Effective Haskell Chapter 8

  • getTerminalSize (Epub p 243) used pure in the case statement and return in the definition of tputScreenDimensions. I don’t think pure has been mentioned before and I’m not sure if it’s a good idea to mix pure and return in one function
  • runHCat (Pub 248) uses Text.hGetContents but this should be TextIO.hGetContents (that was the qualified import earlier in the chapter)

Great catch- thanks!
I agree that we shouldn’t mix return and pure - I must have overlooked that example when I was doing some earlier revision, I’ll be sure to get that fixed for the next beta update!