summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-01-10 14:08:32 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-13 02:32:45 (GMT)
commit30be3bf13a6e72247ff561df1f291370dad79ef9 (patch)
treef2d2b311eb45c27db886ceced2371e11f46753c0
parentde01427e6b1d45122c84eaf03122fda26c4dc688 (diff)
downloadghc-30be3bf13a6e72247ff561df1f291370dad79ef9.zip
ghc-30be3bf13a6e72247ff561df1f291370dad79ef9.tar.gz
ghc-30be3bf13a6e72247ff561df1f291370dad79ef9.tar.bz2
Comments in TcHsType
-rw-r--r--compiler/typecheck/TcHsType.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index 274fd39..5635b2d 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -1787,7 +1787,7 @@ Note [Promotion in signatures]
If an unsolved metavariable in a signature is not generalized
(because we're not generalizing the construct -- e.g., pattern
sig -- or because the metavars are constrained -- see kindGeneralizeSome)
-we need to promote to maintain (MetaTvInv) of Note [TcLevel and untouchable type variables]
+we need to promote to maintain (WantedTvInv) of Note [TcLevel and untouchable type variables]
in TcType. Note that promotion is identical in effect to generalizing
and the reinstantiating with a fresh metavariable at the current level.
So in some sense, we generalize *all* variables, but then re-instantiate
@@ -1804,7 +1804,7 @@ than the surrounding context.) This kappa cannot be solved for while checking
the pattern signature (which is not kind-generalized). When we are checking
the *body* of foo, though, we need to unify the type of x with the argument
type of bar. At this point, the ambient TcLevel is 1, and spotting a
-matavariable with level 2 would violate the (MetaTvInv) invariant of
+matavariable with level 2 would violate the (WantedTvInv) invariant of
Note [TcLevel and untouchable type variables]. So, instead of kind-generalizing,
we promote the metavariable to level 1. This is all done in kindGeneralizeNone.