Deal more correctly with orphan instances
authorsimonpj@microsoft.com <unknown>
Wed, 21 Feb 2007 16:30:47 +0000 (16:30 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 21 Feb 2007 16:30:47 +0000 (16:30 +0000)
commiteb2bf7ad9f967861da2e19ff71a80428c7c2df28
tree91c74d096d3b81b46256146402087d12340692fa
parentede4d6f3d1c7ec99c2bbf2148fcb56588a649979
Deal more correctly with orphan instances

Conal Eliott (Trac #1145) exposed a nasty flaw in the way in which
orphan instances are computed, when there are functional dependencies
in the class.  It took me some time to figure out what was going on,
and led to more refactoring.

Briefly:

* Elaborate comments about orphan-hood and versioning added to IfaceSyn
* The is_orph field vanishes from InstEnv.Instance
* Similarly ru_orph vanishes from CoreSyn.CoreRule
* Orphan-hood is computed in MkIface.instanceToIfaceInst, and
MkIface.coreRuleToIfaceRule

Elsewhere just tidying up.
compiler/coreSyn/CoreSyn.lhs
compiler/deSugar/Desugar.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/rename/RnNames.lhs
compiler/specialise/Rules.lhs
compiler/types/FunDeps.lhs
compiler/types/InstEnv.lhs