
Hi David,
I think you can do something like providing a LogTree.Internal module which
you use internally and which exports everything you need, and making your
LogTree module which re-exports only the safe subset which "unknown" code
would then import. I don't think there is a way of stopping anyone from
importing your LogTree.Internal module though.
On Sun, Apr 13, 2014 at 9:42 PM, David Banas
Hi all,
I’ve defined a typeclass, *LogTree*, and would like to put each instance definition in its own source file, in order that *LogTree.hs *not grow to a ridiculous length. I’m attempting to use data abstraction, in order to future-proof the user interface to this class. So, for instance, I don’t make all of the data constructors defined in LogTree accessible, via the module export list, but rather force the user to use certain “helper” functions, instead. However, the individual instance definitions *do* need access to these data constructors, but they’re in a different source file.
*Is this possible? That is, is it possible to provide different export lists to “friendly” vs. “unknown” client code?*
Thanks, -db
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe