Private classes

Joachim Breitner mail at
Sat Aug 17 21:49:51 CEST 2013


Am Samstag, den 17.08.2013, 20:34 +0200 schrieb Bas van Dijk:
> I used the following in the past:
> module M (PublicClass(..)) where
> class HiddenClass a
> class HiddenClass a => PublicClass a where
>   ...

>   ...
> Now users of M can't declare instances of PublicClass because they
> don't have its superclass HiddenClass in scope.

nice idea! Unfortunately not quite what I need; I still want the user to
be able to use standalone deriving instances for the class.


Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Glasgow-haskell-users mailing list