
13 Apr
2014
13 Apr
'14
9:42 a.m.
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