[commit: ghc] type-nats-simple: Just a comment to make it clear that AxiomRuleCo should be fully saturated. (c8606a7)
git at git.haskell.org
git at git.haskell.org
Sat Sep 7 22:49:25 CEST 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : type-nats-simple
Link : http://ghc.haskell.org/trac/ghc/changeset/c8606a72b1608f551776dffb242a992db4b48a39/ghc
>---------------------------------------------------------------
commit c8606a72b1608f551776dffb242a992db4b48a39
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date: Sat Sep 7 13:42:46 2013 -0700
Just a comment to make it clear that AxiomRuleCo should be fully saturated.
>---------------------------------------------------------------
c8606a72b1608f551776dffb242a992db4b48a39
compiler/typecheck/TcEvidence.lhs | 2 ++
compiler/types/Coercion.lhs | 2 ++
2 files changed, 4 insertions(+)
diff --git a/compiler/typecheck/TcEvidence.lhs b/compiler/typecheck/TcEvidence.lhs
index 2f3c12e..ffdce64 100644
--- a/compiler/typecheck/TcEvidence.lhs
+++ b/compiler/typecheck/TcEvidence.lhs
@@ -106,6 +106,8 @@ data TcCoercion
| TcCoVarCo EqVar -- variable always at role N
| TcAxiomInstCo (CoAxiom Branched) Int [TcType] -- Int specifies branch number
-- See [CoAxiom Index] in Coercion.lhs
+ -- This is number of types and coercions are expected to macth to CoAxiomRule
+ -- (i.e., the CoAxiomRules are always fully saturated)
| TcAxiomRuleCo CoAxiomRule [TcType] [TcCoercion]
| TcSymCo TcCoercion
| TcTransCo TcCoercion TcCoercion
diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs
index 8498b7b..77d280e 100644
--- a/compiler/types/Coercion.lhs
+++ b/compiler/types/Coercion.lhs
@@ -181,6 +181,8 @@ data Coercion
| SymCo Coercion -- :: e -> e
| TransCo Coercion Coercion -- :: e -> e -> e
+ -- The number of types and coercions should match exactly the expectations
+ -- of the CoAxiomRule (i.e., the rule is fully saturated).
| AxiomRuleCo CoAxiomRule [Type] [Coercion]
-- These are destructors
More information about the ghc-commits
mailing list