Private classes

Joachim Breitner mail at
Sat Aug 17 20:08:46 CEST 2013


for some reason I was under the impression that if I don’t export the
methods of a class, then no user of my module can create instances. But
I was wrong and in fact they can; the methods will just all be bound to
"error ...".

Is there really no way to create a class so that no-one else can create
any instances?


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