Recursive type class. More extensive use of Template Haskell to avoid boilerplate. More notes in source code.