[Haskell] Class-parameterized classes, and the type-level logarithm