I sometimes do this

-<
  class (Show c) =>  C c where
  foo = show c

  data CObj= forall c. (C c, Show c) => CObj c

  instance C Cobj where -- my existantial type should also implement class C
    foo (CObj c) = foo c
->


Would it be a nice idea to just write
-<
  data CObj= forall c. (C c, Show c) => CObj c
  deriving (C) ?
->
?

Or is this already possible?

Marc Weber
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to