summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2019-07-16 17:17:01 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-19 18:07:37 -0400
commit69adb25329257b38d465c8c7896377918449fdd0 (patch)
treecc58ac50d4c0a7e8e1a7adaeb60712a6b927b599
parent9372ff927a18e83e61557f5bca8ef054e39dee41 (diff)
downloadhaskell-69adb25329257b38d465c8c7896377918449fdd0.tar.gz
Fix #16870 by improving documentation (only)
-rw-r--r--compiler/types/CoAxiom.hs6
-rw-r--r--compiler/types/TyCoRep.hs4
2 files changed, 4 insertions, 6 deletions
diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs
index 57fb2ef1d4..a29659ab14 100644
--- a/compiler/types/CoAxiom.hs
+++ b/compiler/types/CoAxiom.hs
@@ -231,7 +231,6 @@ data CoAxBranch
-- in TcTyClsDecls
, cab_roles :: [Role] -- See Note [CoAxBranch roles]
, cab_lhs :: [Type] -- Type patterns to match against
- -- See Note [CoAxiom saturation]
, cab_rhs :: Type -- Right-hand side of the equality
, cab_incomps :: [CoAxBranch] -- The previous incompatible branches
-- See Note [Storing compatibility]
@@ -310,10 +309,7 @@ coAxBranchIncomps = cab_incomps
placeHolderIncomps :: [CoAxBranch]
placeHolderIncomps = panic "placeHolderIncomps"
-{- Note [CoAxiom saturation]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* When co
-
+{-
Note [CoAxBranch type variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the case of a CoAxBranch of an associated type-family instance,
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 4bc2ff013d..1f2f8c6724 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -1193,13 +1193,15 @@ data Coercion
| CoVarCo CoVar -- :: _ -> (N or R)
-- result role depends on the tycon of the variable's type
- -- AxiomInstCo :: e -> _ -> [N] -> e
+ -- AxiomInstCo :: e -> _ -> ?? -> e
| AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion]
-- See also [CoAxiom index]
-- The coercion arguments always *precisely* saturate
-- arity of (that branch of) the CoAxiom. If there are
-- any left over, we use AppCo.
-- See [Coercion axioms applied to coercions]
+ -- The roles of the argument coercions are determined
+ -- by the cab_roles field of the relevant branch of the CoAxiom
| AxiomRuleCo CoAxiomRule [Coercion]
-- AxiomRuleCo is very like AxiomInstCo, but for a CoAxiomRule