diff options
author | Richard Eisenberg <rae@cs.brynmawr.edu> | 2019-01-03 19:02:10 -0500 |
---|---|---|
committer | Richard Eisenberg <rae@cs.brynmawr.edu> | 2019-01-03 19:02:10 -0500 |
commit | 7fcd6808d73178f76e1b4d5d11d2abdd9aca5591 (patch) | |
tree | 2f390b4de66c7c4e040b0f7b347fc6be7da25382 | |
parent | 17bd163566153babbf51adaff8397f948ae363ca (diff) | |
download | haskell-7fcd6808d73178f76e1b4d5d11d2abdd9aca5591.tar.gz |
Fix some typos, etc., in comments.
[ci skip]
-rw-r--r-- | compiler/types/CoAxiom.hs | 2 | ||||
-rw-r--r-- | compiler/types/FamInstEnv.hs | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/compiler/types/CoAxiom.hs b/compiler/types/CoAxiom.hs index 5c4237c593..112ab27864 100644 --- a/compiler/types/CoAxiom.hs +++ b/compiler/types/CoAxiom.hs @@ -223,7 +223,7 @@ data CoAxBranch , cab_tvs :: [TyVar] -- Bound type variables; not necessarily fresh , cab_eta_tvs :: [TyVar] -- Eta-reduced tyvars -- See Note [CoAxBranch type variables] - -- cab_tvs and cab_lhsmay be eta-reduded; see FamInstEnv + -- cab_tvs and cab_lhs may be eta-reduded; see -- Note [Eta reduction for data families] , cab_cvs :: [CoVar] -- Bound coercion variables -- Always empty, for now. diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs index c6dcab6ea1..d721ad2873 100644 --- a/compiler/types/FamInstEnv.hs +++ b/compiler/types/FamInstEnv.hs @@ -615,10 +615,11 @@ If we're not careful during tidying, then when this program is compiled with axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 :: Sing _ = DataFamilyInstanceLHS.R:SingMyKind_ _ -Its misleading to have a wildcard type appearing on the RHS like -that. To avoid this issue, during tidying, we always opt to add a -numeric suffix to types that are simply `_`. That way, you instead end -up with: +It's misleading to have a wildcard type appearing on the RHS like +that. To avoid this issue, when building a CoAxiom (which is what eventually +gets printed above), we tidy all the variables in an env that already contains +'_'. Thus, any variable named '_' will be renamed, giving us the nicer output +here: COERCION AXIOMS axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 :: @@ -626,7 +627,9 @@ up with: Which is at least legal syntax. -See also Note [CoAxBranch type variables] in CoAxiom +See also Note [CoAxBranch type variables] in CoAxiom; note that we +are tidying (changing OccNames only), not freshening, in accordance with +that Note. -} -- all axiom roles are Nominal, as this is only used with type families |