[commit: ghc] master: Comments only -- clarifying Notes around compatibility. (9b38f6a)

git at git.haskell.org git at git.haskell.org
Sat Mar 22 22:39:51 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9b38f6a12c0a9e932ed4be4758d90556f868f6bf/ghc

>---------------------------------------------------------------

commit 9b38f6a12c0a9e932ed4be4758d90556f868f6bf
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Mar 21 17:22:10 2014 -0400

    Comments only -- clarifying Notes around compatibility.


>---------------------------------------------------------------

9b38f6a12c0a9e932ed4be4758d90556f868f6bf
 compiler/iface/MkIface.lhs    |    2 +-
 compiler/types/CoAxiom.lhs    |    1 +
 compiler/types/FamInstEnv.lhs |    4 +++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs
index 51df08c..bb51cda 100644
--- a/compiler/iface/MkIface.lhs
+++ b/compiler/iface/MkIface.lhs
@@ -1525,7 +1525,7 @@ coAxiomToIfaceDecl ax@(CoAxiom { co_ax_tc = tycon, co_ax_branches = branches
 
 -- 2nd parameter is the list of branch LHSs, for conversion from incompatible branches
 -- to incompatible indices
--- See [Storing compatibility] in CoAxiom
+-- See Note [Storing compatibility] in CoAxiom
 coAxBranchToIfaceBranch :: TidyEnv -> [[Type]] -> CoAxBranch -> IfaceAxBranch
 coAxBranchToIfaceBranch env0 lhs_s
                         branch@(CoAxBranch { cab_incomps = incomps })
diff --git a/compiler/types/CoAxiom.lhs b/compiler/types/CoAxiom.lhs
index a0a4974..d6122b2 100644
--- a/compiler/types/CoAxiom.lhs
+++ b/compiler/types/CoAxiom.lhs
@@ -327,6 +327,7 @@ isImplicitCoAxiom = co_ax_implicit
 coAxBranchIncomps :: CoAxBranch -> [CoAxBranch]
 coAxBranchIncomps = cab_incomps
 
+-- See Note [Compatibility checking] in FamInstEnv
 placeHolderIncomps :: [CoAxBranch]
 placeHolderIncomps = panic "placeHolderIncomps"
 
diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs
index c17668b..0421f48 100644
--- a/compiler/types/FamInstEnv.lhs
+++ b/compiler/types/FamInstEnv.lhs
@@ -439,7 +439,7 @@ only when we can be sure that 'a' is not Int.
 To achieve this, after finding a possible match within the equations, we have to
 go back to all previous equations and check that, under the
 substitution induced by the match, other branches are surely apart. (See
-[Apartness].) This is similar to what happens with class
+Note [Apartness].) This is similar to what happens with class
 instance selection, when we need to guarantee that there is only a match and
 no unifiers. The exact algorithm is different here because the the
 potentially-overlapping group is closed.
@@ -475,6 +475,7 @@ irrelevant (clause 1 of compatible) or benign (clause 2 of compatible).
 
 \begin{code}
 
+-- See Note [Compatibility]
 compatibleBranches :: CoAxBranch -> CoAxBranch -> Bool
 compatibleBranches (CoAxBranch { cab_lhs = lhs1, cab_rhs = rhs1 })
                    (CoAxBranch { cab_lhs = lhs2, cab_rhs = rhs2 })
@@ -487,6 +488,7 @@ compatibleBranches (CoAxBranch { cab_lhs = lhs1, cab_rhs = rhs1 })
 
 -- takes a CoAxiom with unknown branch incompatibilities and computes
 -- the compatibilities
+-- See Note [Storing compatibility] in CoAxiom
 computeAxiomIncomps :: CoAxiom br -> CoAxiom br
 computeAxiomIncomps ax@(CoAxiom { co_ax_branches = branches })
   = ax { co_ax_branches = go [] branches }



More information about the ghc-commits mailing list