[Haskell] closure of coercions with classes