diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-01-26 03:15:37 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-14 05:32:37 -0500 |
commit | cf739945b8b28ff463dc44925348f20b3c1f22cb (patch) | |
tree | 855da097719d6b62a15fa12034c60379c49dc4a5 /compiler/typecheck | |
parent | af6a0c36431639655762440ec8d652796b86fe58 (diff) | |
download | haskell-cf739945b8b28ff463dc44925348f20b3c1f22cb.tar.gz |
Module hierarchy: HsToCore (cf #13009)
Diffstat (limited to 'compiler/typecheck')
-rw-r--r-- | compiler/typecheck/TcEvidence.hs | 4 | ||||
-rw-r--r-- | compiler/typecheck/TcHoleErrors.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcHsSyn.hs | 4 | ||||
-rw-r--r-- | compiler/typecheck/TcInstDcls.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcMType.hs | 4 | ||||
-rw-r--r-- | compiler/typecheck/TcPatSyn.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcRnMonad.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcSigs.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcSplice.hs | 14 | ||||
-rw-r--r-- | compiler/typecheck/TcTyClsDecls.hs | 2 |
10 files changed, 19 insertions, 19 deletions
diff --git a/compiler/typecheck/TcEvidence.hs b/compiler/typecheck/TcEvidence.hs index 557ca5e2fe..f60405e8be 100644 --- a/compiler/typecheck/TcEvidence.hs +++ b/compiler/typecheck/TcEvidence.hs @@ -212,7 +212,7 @@ data HsWrapper -- The TcType is the "from" type of the first wrapper -- The SDoc explains the circumstances under which we have created this -- WpFun, in case we run afoul of levity polymorphism restrictions in - -- the desugarer. See Note [Levity polymorphism checking] in DsMonad + -- the desugarer. See Note [Levity polymorphism checking] in GHC.HsToCore.Monad | WpCast TcCoercionR -- A cast: [] `cast` co -- Guaranteed not the identity coercion @@ -782,7 +782,7 @@ Important Details: - An EvCallStack term desugars to a CoreExpr of type `IP "some str" CallStack`. The desugarer will need to unwrap the IP newtype before pushing a new - call-site onto a given stack (See DsBinds.dsEvCallStack) + call-site onto a given stack (See GHC.HsToCore.Binds.dsEvCallStack) - When we emit a new wanted CallStack from rule (2) we set its origin to `IPOccOrigin ip_name` instead of the original `OccurrenceOf func` diff --git a/compiler/typecheck/TcHoleErrors.hs b/compiler/typecheck/TcHoleErrors.hs index ba8fa30eb1..1008bc760c 100644 --- a/compiler/typecheck/TcHoleErrors.hs +++ b/compiler/typecheck/TcHoleErrors.hs @@ -51,7 +51,7 @@ import Data.Graph ( graphFromEdges, topSort ) import TcSimplify ( simpl_top, runTcSDeriveds ) import TcUnify ( tcSubType_NC ) -import ExtractDocs ( extractDocs ) +import GHC.HsToCore.Docs ( extractDocs ) import qualified Data.Map as Map import GHC.Hs.Doc ( unpackHDS, DeclDocMap(..) ) import HscTypes ( ModIface_(..) ) diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs index 3ae4e63fc6..ea533d578e 100644 --- a/compiler/typecheck/TcHsSyn.hs +++ b/compiler/typecheck/TcHsSyn.hs @@ -1895,7 +1895,7 @@ zonkTcMethInfoToMethInfoX ze (name, ty, gdm_spec) --------------------------------------- {- Note [Zonking the LHS of a RULE] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -See also DsBinds Note [Free tyvars on rule LHS] +See also GHC.HsToCore.Binds Note [Free tyvars on rule LHS] We need to gather the type variables mentioned on the LHS so we can quantify over them. Example: @@ -1918,7 +1918,7 @@ We do this in two stages. ZonkEnv. (This is in fact the whole reason that the ZonkEnv has a UnboundTyVarZonker.) -* In DsBinds, we quantify over it. See DsBinds +* In GHC.HsToCore.Binds, we quantify over it. See GHC.HsToCore.Binds Note [Free tyvars on rule LHS] Quantifying here is awkward because (a) the data type is big and (b) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index 96775696a9..21e1ba81ba 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -1163,7 +1163,7 @@ addDFunPrags dfun_id sc_meth_ids con_app = mkLams dfun_bndrs $ mkApps (Var (dataConWrapId dict_con)) dict_args -- mkApps is OK because of the checkForLevPoly call in checkValidClass - -- See Note [Levity polymorphism checking] in DsMonad + -- See Note [Levity polymorphism checking] in GHC.HsToCore.Monad dict_args = map Type inst_tys ++ [mkVarApps (Var id) dfun_bndrs | id <- sc_meth_ids] diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index 52599c925c..85a59b697a 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -2333,7 +2333,7 @@ tidySigSkol env cx ty tv_prs * * ************************************************************************* -See Note [Levity polymorphism checking] in DsMonad +See Note [Levity polymorphism checking] in GHC.HsToCore.Monad -} @@ -2354,7 +2354,7 @@ ensureNotLevPoly ty doc -- forall a. a. See, for example, test ghci/scripts/T9140 checkForLevPoly doc ty - -- See Note [Levity polymorphism checking] in DsMonad + -- See Note [Levity polymorphism checking] in GHC.HsToCore.Monad checkForLevPoly :: SDoc -> Type -> TcM () checkForLevPoly = checkForLevPolyX addErr diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs index ff90b473b2..129a0e5f10 100644 --- a/compiler/typecheck/TcPatSyn.hs +++ b/compiler/typecheck/TcPatSyn.hs @@ -1093,7 +1093,7 @@ Note [Record PatSyn Desugaring] It is important that prov_theta comes before req_theta as this ordering is used when desugaring record pattern synonym updates. -Any change to this ordering should make sure to change deSugar/DsExpr.hs if you +Any change to this ordering should make sure to change GHC.HsToCore.Expr if you want to avoid difficult to decipher core lint errors! -} diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs index 4bf9ad90cf..d346020963 100644 --- a/compiler/typecheck/TcRnMonad.hs +++ b/compiler/typecheck/TcRnMonad.hs @@ -242,7 +242,7 @@ initTc hsc_env hsc_src keep_rn_syntax mod loc do_this -- We want to serialize the documentation in the .hi-files, -- and need to extract it from the renamed syntax first. - -- See 'ExtractDocs.extractDocs'. + -- See 'GHC.HsToCore.Docs.extractDocs'. | gopt Opt_Haddock dflags = Just empty_val | keep_rn_syntax = Just empty_val diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs index 1e284ec0a7..3558ebd733 100644 --- a/compiler/typecheck/TcSigs.hs +++ b/compiler/typecheck/TcSigs.hs @@ -668,7 +668,7 @@ Note that -From the TcSpecPrag, in DsBinds we generate a binding for f_spec and a RULE: +From the TcSpecPrag, in GHC.HsToCore.Binds we generate a binding for f_spec and a RULE: f_spec :: Int -> b -> Int f_spec = wrap<f rhs> diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs index 485948a5a3..ea848d391f 100644 --- a/compiler/typecheck/TcSplice.hs +++ b/compiler/typecheck/TcSplice.hs @@ -99,8 +99,8 @@ import DataCon import TcEvidence import Id import IdInfo -import DsExpr -import DsMonad +import GHC.HsToCore.Expr +import GHC.HsToCore.Monad import GHC.Serialized import ErrUtils import Util @@ -179,7 +179,7 @@ tcTypedBracket rn_expr brack@(TExpBr _ expr) res_ty ; m_var <- mkTyVarTy <$> mkMetaTyVar -- Make sure the type variable satisfies Quote ; ev_var <- emitQuoteWanted m_var - -- Bundle them together so they can be used in DsMeta for desugaring + -- Bundle them together so they can be used in GHC.HsToCore.Quote for desugaring -- brackets. ; let wrapper = QuoteWrapper ev_var m_var -- Typecheck expr to make sure it is valid, @@ -380,7 +380,7 @@ The life cycle of a un-typed bracket: In both cases, desugaring happens like this: - * HsTcBracketOut is desugared by DsMeta.dsBracket. It + * HsTcBracketOut is desugared by GHC.HsToCore.Quote.dsBracket. It a) Extends the ds_meta environment with the PendingSplices attached to the bracket @@ -395,10 +395,10 @@ In both cases, desugaring happens like this: ${n}(e). The name is initialised to an (Unqual "splice") when the splice is created; the renamer gives it a unique. - * When DsMeta (used to desugar the body of the bracket) comes across + * When GHC.HsToCore.Quote (used to desugar the body of the bracket) comes across a splice, it looks up the splice's Name, n, in the ds_meta envt, to find an (HsExpr Id) that should be substituted for the splice; - it just desugars it to get a CoreExpr (DsMeta.repSplice). + it just desugars it to get a CoreExpr (GHC.HsToCore.Quote.repSplice). Example: Source: f = [| Just $(g 3) |] @@ -511,7 +511,7 @@ returned together in a `QuoteWrapper` and then passed along to two further place during compilation: 1. Typechecking nested splices (immediately in tcPendingSplice) -2. Desugaring quotations (see DsMeta) +2. Desugaring quotations (see GHC.HsToCore.Quote) `tcPendingSplice` takes the `m` type variable as an argument and checks each nested splice against this variable `m`. During this diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index 3048d6178d..da4cbdb981 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -3956,7 +3956,7 @@ checkValidClass cls -- method in a dictionary -- example of what this prevents: -- class BoundedX (a :: TYPE r) where minBound :: a - -- See Note [Levity polymorphism checking] in DsMonad + -- See Note [Levity polymorphism checking] in GHC.HsToCore.Monad ; checkForLevPoly empty tau1 ; unless constrained_class_methods $ |