summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore
diff options
context:
space:
mode:
authorTakenobu Tani <takenobu.hs@gmail.com>2020-05-30 23:11:59 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-10 03:39:59 -0400
commit2487912938f188cb264e4a11d21bf750adccc5e7 (patch)
tree13843cfd8f27bf6f1672a4e37d6af0e04bb34d18 /compiler/GHC/HsToCore
parenta47e6442bc4be4a33339499d876792ba109e8d32 (diff)
downloadhaskell-2487912938f188cb264e4a11d21bf750adccc5e7.tar.gz
Clarify leaf module names for new module hierarchy
This updates comments only. This patch replaces leaf module names according to new module hierarchy [1][2] as followings: * Expand leaf names to easily find the module path: for instance, `Id.hs` to `GHC.Types.Id`. * Modify leaf names according to new module hierarchy: for instance, `Convert.hs` to `GHC.ThToHs`. * Fix typo: for instance, `GHC.Core.TyCo.Rep.hs` to `GHC.Core.TyCo.Rep` See also !3375 [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular [2]: https://gitlab.haskell.org/ghc/ghc/issues/13009
Diffstat (limited to 'compiler/GHC/HsToCore')
-rw-r--r--compiler/GHC/HsToCore/Binds.hs6
-rw-r--r--compiler/GHC/HsToCore/Expr.hs2
-rw-r--r--compiler/GHC/HsToCore/PmCheck.hs4
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Ppr.hs2
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Types.hs4
-rw-r--r--compiler/GHC/HsToCore/Quote.hs2
6 files changed, 10 insertions, 10 deletions
diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs
index 4c30aed8ff..8b53e87641 100644
--- a/compiler/GHC/HsToCore/Binds.hs
+++ b/compiler/GHC/HsToCore/Binds.hs
@@ -156,7 +156,7 @@ dsHsBind dflags b@(FunBind { fun_id = L loc fun
-- oracle.
-- addTyCsDs: Add type evidence to the refinement type
-- predicate of the coverage checker
- -- See Note [Type and Term Equality Propagation] in PmCheck
+ -- See Note [Type and Term Equality Propagation] in "GHC.HsToCore.PmCheck"
matchWrapper
(mkPrefixFunRhs (L loc (idName fun)))
Nothing matches
@@ -298,7 +298,7 @@ dsAbsBinds dflags tyvars dicts exports
; let mk_bind (ABE { abe_wrap = wrap
, abe_poly = global
, abe_mono = local, abe_prags = spec_prags })
- -- See Note [AbsBinds wrappers] in HsBinds
+ -- See Note [AbsBinds wrappers] in "GHC.Hs.Binds"
= do { tup_id <- newSysLocalDs tup_ty
; core_wrap <- dsHsWrapper wrap
; let rhs = core_wrap $ mkLams tyvars $ mkLams dicts $
@@ -962,7 +962,7 @@ Consider
After type checking the LHS becomes (foo alpha (C alpha)), where alpha
is an unbound meta-tyvar. The zonker in GHC.Tc.Utils.Zonk is careful not to
turn the free alpha into Any (as it usually does). Instead it turns it
-into a TyVar 'a'. See Note [Zonking the LHS of a RULE] in Ghc.Tc.Syntax.
+into a TyVar 'a'. See Note [Zonking the LHS of a RULE] in "GHC.Tc.Utils.Zonk".
Now we must quantify over that 'a'. It's /really/ inconvenient to do that
in the zonker, because the HsExpr data type is very large. But it's /easy/
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index fb3424c2f9..5e71fabb68 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -474,7 +474,7 @@ dsExpr (HsIf _ fun guard_expr then_expr else_expr)
= do { pred <- dsLExpr guard_expr
; b1 <- dsLExpr then_expr
; b2 <- dsLExpr else_expr
- ; case fun of -- See Note [Rebindable if] in Hs.Expr
+ ; case fun of -- See Note [Rebindable if] in "GHC.Hs.Expr"
(SyntaxExprTc {}) -> dsSyntaxExpr fun [pred, b1, b2]
NoSyntaxExprTc -> return $ mkIfThenElse pred b1 b2 }
diff --git a/compiler/GHC/HsToCore/PmCheck.hs b/compiler/GHC/HsToCore/PmCheck.hs
index ef56c35845..f09fd4ecbe 100644
--- a/compiler/GHC/HsToCore/PmCheck.hs
+++ b/compiler/GHC/HsToCore/PmCheck.hs
@@ -510,7 +510,7 @@ translatePat fam_insts x pat = case pat of
translateConPatOut fam_insts x con arg_tys ex_tvs dicts ps
NPat ty (L _ olit) mb_neg _ -> do
- -- See Note [Literal short cut] in GHC.HsToCore.Match.Literal.hs
+ -- See Note [Literal short cut] in "GHC.HsToCore.Match.Literal"
-- We inline the Literal short cut for @ty@ here, because @ty@ is more
-- precise than the field of OverLitTc, which is all that dsOverLit (which
-- normally does the literal short cut) can look at. Also @ty@ matches the
@@ -919,7 +919,7 @@ throttle limit old@(MkDeltas old_ds) new@(MkDeltas new_ds)
| otherwise = (Precise, new)
-- | Matching on a newtype doesn't force anything.
--- See Note [Divergence of Newtype matches] in Oracle.
+-- See Note [Divergence of Newtype matches] in "GHC.HsToCore.PmCheck.Oracle".
conMatchForces :: PmAltCon -> Bool
conMatchForces (PmAltConLike (RealDataCon dc))
| isNewTyCon (dataConTyCon dc) = False
diff --git a/compiler/GHC/HsToCore/PmCheck/Ppr.hs b/compiler/GHC/HsToCore/PmCheck/Ppr.hs
index f8619f9a1d..5845450d21 100644
--- a/compiler/GHC/HsToCore/PmCheck/Ppr.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Ppr.hs
@@ -92,7 +92,7 @@ Unhandled constraints that refer to HsExpr are typically ignored by the solver
(it does not even substitute in HsExpr so they are even printed as wildcards).
Additionally, the oracle returns a substitution if it succeeds so we apply this
substitution to the vectors before printing them out (see function `pprOne' in
-Check.hs) to be more precise.
+"GHC.HsToCore.PmCheck") to be more precise.
-}
-- | Extract and assigns pretty names to constraint variables with refutable
diff --git a/compiler/GHC/HsToCore/PmCheck/Types.hs b/compiler/GHC/HsToCore/PmCheck/Types.hs
index 0c3c9f3286..50000d7ace 100644
--- a/compiler/GHC/HsToCore/PmCheck/Types.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Types.hs
@@ -475,7 +475,7 @@ instance Outputable a => Outputable (SharedDIdEnv a) where
-- entries are possibly shared when we figure out that two variables must be
-- equal, thus represent the same set of values.
--
--- See Note [TmState invariants] in Oracle.
+-- See Note [TmState invariants] in "GHC.HsToCore.PmCheck.Oracle".
data TmState
= TmSt
{ ts_facts :: !(SharedDIdEnv VarInfo)
@@ -492,7 +492,7 @@ data TmState
-- Also caches the type ('vi_ty'), the 'PossibleMatches' of a COMPLETE set
-- ('vi_cache').
--
--- Subject to Note [The Pos/Neg invariant] in PmOracle.
+-- Subject to Note [The Pos/Neg invariant] in "GHC.HsToCore.PmCheck.Oracle".
data VarInfo
= VI
{ vi_ty :: !Type
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index d67f5b4509..e84a4cbb27 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -1018,7 +1018,7 @@ rep_ty_sig mk_sig loc sig_ty nm
rep_patsyn_ty_sig :: SrcSpan -> LHsSigType GhcRn -> Located Name
-> MetaM (SrcSpan, Core (M TH.Dec))
-- represents a pattern synonym type signature;
--- see Note [Pattern synonym type signatures and Template Haskell] in Convert
+-- see Note [Pattern synonym type signatures and Template Haskell] in "GHC.ThToHs"
--
-- Don't create the implicit and explicit variables when desugaring signatures,
-- see Note [Scoped type variables in class and instance declarations]