summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2019-10-08 14:10:46 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-17 01:03:51 -0400
commit4efdda9057366db3ecf6beb3b889f830c0d8d641 (patch)
tree2eb06cee82aa5fcfe5b49cc14fb287e7290fe57d /compiler
parentb15a7fb8aa022bfdf3286d65227061c19a4acf28 (diff)
downloadhaskell-4efdda9057366db3ecf6beb3b889f830c0d8d641.tar.gz
Tiny fixes to comments around flattening.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcFlatten.hs4
-rw-r--r--compiler/typecheck/TcHsType.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index 8f271ac444..69ced0b00e 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -815,7 +815,7 @@ Because flattening zonks and the returned coercion ("co" above) is also
zonked, it's possible that (co :: xi ~ ty) isn't quite true. So, instead,
we can rely on this fact:
- (F1) tcTypeKind(xi) succeeds and returns a fully zonked kind
+ (F0) co :: xi ~ zonk(ty)
Note that the left-hand type of co is *always* precisely xi. The right-hand
type may or may not be ty, however: if ty has unzonked filled-in metavariables,
@@ -1535,7 +1535,7 @@ flattenTyVar tv
; return (ty2, co2 `mkTransCo` co1) }
FTRNotFollowed -- Done, but make sure the kind is zonked
- -- Note [Flattening] invariant (F1)
+ -- Note [Flattening] invariant (F0) and (F1)
-> do { tv' <- liftTcS $ updateTyVarKindM zonkTcType tv
; role <- getRole
; let ty' = mkTyVarTy tv'
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index c2776c7b1b..82cc6e2002 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -1293,7 +1293,7 @@ The calls to mkAppTyM is the other place we are very careful.
Note [mkAppTyM]
~~~~~~~~~~~~~~~
-mkAppTyM is trying to guaranteed the Purely Kinded Type Invariant
+mkAppTyM is trying to guarantee the Purely Kinded Type Invariant
(PKTI) for its result type (fun arg). There are two ways it can go wrong:
* Nasty case 1: forall types (polykinds/T14174a)