[commit: ghc] master: Anchor type family instances deterministically (10a0775)
git at git.haskell.org
git at git.haskell.org
Mon Aug 31 15:11:43 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/10a07753ff4ac0c1285454567c926d580d0f0470/ghc
>---------------------------------------------------------------
commit 10a07753ff4ac0c1285454567c926d580d0f0470
Author: Bartosz Nitka <niteria at gmail.com>
Date: Mon Aug 31 16:10:34 2015 +0100
Anchor type family instances deterministically
Summary:
This is very similar to D1073. It makes type family instances to be
attached to a binding with a least `OccName`, therefore not depending on `Unique` ordering.
Test Plan:
* this makes `Language.Haskell.Exts.SrcLoc` deterministic
* ./validate
Reviewers: simonmar, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1192
GHC Trac Issues: #4012
>---------------------------------------------------------------
10a07753ff4ac0c1285454567c926d580d0f0470
compiler/iface/MkIface.hs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index 697972a..f594181 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -1853,13 +1853,8 @@ famInstToIfaceFamInst (FamInst { fi_axiom = axiom,
orph | is_local fam_decl
= NotOrphan (nameOccName fam_decl)
-
- | not (isEmptyNameSet lhs_names)
- = NotOrphan (nameOccName (head (nameSetElems lhs_names)))
-
-
| otherwise
- = IsOrphan
+ = chooseOrphanAnchor $ nameSetElems lhs_names
--------------------------
toIfaceLetBndr :: Id -> IfaceLetBndr
More information about the ghc-commits
mailing list