[Haskell] The two-class trick