[Haskell-cafe] rewrite rules to specialize function according to type class?