
27 Sep
2008
27 Sep
'08
8:47 a.m.
kahl@cas.mcmaster.ca wrote:
Simon Marlow
wrote: We must have the property that the imports of a module do not affect its API - and the only way to have this property is to avoid orphan instances in library APIs.
To be more precise, I would say that each orphan instance in a library API must be the only export of a dedicated visible module, and only exported by that module.
(The only importers of orphan instances are typically Main modules, or ``almost-Main'' modules.)
Why do you believe that? We seem to have evidence to the contrary, with Control.Monad.Instances being imported by library modules. Cheers, Simon