Effective Haskell Chapter 10

In Chapter 10, in the section in “Building A Basic Metrics System with IORefs” after the new type Metrics is introduced in the text, it isn’t used in the code (AppMetrics is still used as the type). I suspect a mismatch between refactoring text and code.

The displayMetrics function is described but the code is missing.

When I ran directorySummaryWithMetrics, if I ran it on a very large directory it failed with too many open file handles (I definitely need to finish the chapter and read ups on the pitfalls of lazy IO :)). When I ran it on smaller directories, all the timings were 0. I ended up looking at the code for timeIt and rewrote the timing code to use getCPUTime (returning the seconds as a double); all the timing were fractions of seconds!