instance visibility

Simon Marlow marlowsd at
Sat Sep 27 08:47:22 EDT 2008

kahl at wrote:
> Simon Marlow <marlowsd at> 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.


More information about the Libraries mailing list