summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/HsToCore')
-rw-r--r--compiler/GHC/HsToCore/Arrows.hs8
-rw-r--r--compiler/GHC/HsToCore/Binds.hs22
-rw-r--r--compiler/GHC/HsToCore/Binds.hs-boot4
-rw-r--r--compiler/GHC/HsToCore/Coverage.hs2
-rw-r--r--compiler/GHC/HsToCore/Expr.hs12
-rw-r--r--compiler/GHC/HsToCore/Expr.hs-boot2
-rw-r--r--compiler/GHC/HsToCore/Foreign/Call.hs6
-rw-r--r--compiler/GHC/HsToCore/Foreign/Decl.hs4
-rw-r--r--compiler/GHC/HsToCore/GuardedRHSs.hs6
-rw-r--r--compiler/GHC/HsToCore/ListComp.hs6
-rw-r--r--compiler/GHC/HsToCore/Match.hs8
-rw-r--r--compiler/GHC/HsToCore/Match.hs-boot2
-rw-r--r--compiler/GHC/HsToCore/Match/Constructor.hs2
-rw-r--r--compiler/GHC/HsToCore/Match/Literal.hs4
-rw-r--r--compiler/GHC/HsToCore/Monad.hs6
-rw-r--r--compiler/GHC/HsToCore/PmCheck.hs2
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Oracle.hs12
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Types.hs8
-rw-r--r--compiler/GHC/HsToCore/Quote.hs6
-rw-r--r--compiler/GHC/HsToCore/Utils.hs16
20 files changed, 69 insertions, 69 deletions
diff --git a/compiler/GHC/HsToCore/Arrows.hs b/compiler/GHC/HsToCore/Arrows.hs
index 450c879b90..24a7f89fb1 100644
--- a/compiler/GHC/HsToCore/Arrows.hs
+++ b/compiler/GHC/HsToCore/Arrows.hs
@@ -39,10 +39,10 @@ import {-# SOURCE #-} GHC.HsToCore.Expr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalB
import TcType
import Type ( splitPiTy )
import TcEvidence
-import CoreSyn
-import CoreFVs
-import CoreUtils
-import MkCore
+import GHC.Core
+import GHC.Core.FVs
+import GHC.Core.Utils
+import GHC.Core.Make
import GHC.HsToCore.Binds (dsHsWrapper)
import Id
diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs
index 124427578d..86d309c73d 100644
--- a/compiler/GHC/HsToCore/Binds.hs
+++ b/compiler/GHC/HsToCore/Binds.hs
@@ -35,15 +35,15 @@ import GHC.HsToCore.GuardedRHSs
import GHC.HsToCore.Utils
import GHC.HsToCore.PmCheck ( needToRunPmCheck, addTyCsDs, checkGuardMatches )
-import GHC.Hs -- lots of things
-import CoreSyn -- lots of things
-import CoreOpt ( simpleOptExpr )
-import OccurAnal ( occurAnalyseExpr )
-import MkCore
-import CoreUtils
-import CoreArity ( etaExpand )
-import CoreUnfold
-import CoreFVs
+import GHC.Hs -- lots of things
+import GHC.Core -- lots of things
+import GHC.Core.SimpleOpt ( simpleOptExpr )
+import OccurAnal ( occurAnalyseExpr )
+import GHC.Core.Make
+import GHC.Core.Utils
+import GHC.Core.Arity ( etaExpand )
+import GHC.Core.Unfold
+import GHC.Core.FVs
import Digraph
import Predicate
@@ -58,7 +58,7 @@ import Id
import MkId(proxyHashId)
import Name
import VarSet
-import Rules
+import GHC.Core.Rules
import VarEnv
import Var( EvVar )
import Outputable
@@ -1160,7 +1160,7 @@ dsEvBinds bs
mk_ev_binds :: Bag (Id,CoreExpr) -> [CoreBind]
-- We do SCC analysis of the evidence bindings, /after/ desugaring
--- them. This is convenient: it means we can use the CoreSyn
+-- them. This is convenient: it means we can use the GHC.Core
-- free-variable functions rather than having to do accurate free vars
-- for EvTerm.
mk_ev_binds ds_binds
diff --git a/compiler/GHC/HsToCore/Binds.hs-boot b/compiler/GHC/HsToCore/Binds.hs-boot
index 36e158b279..aa3134ac72 100644
--- a/compiler/GHC/HsToCore/Binds.hs-boot
+++ b/compiler/GHC/HsToCore/Binds.hs-boot
@@ -1,6 +1,6 @@
module GHC.HsToCore.Binds where
import GHC.HsToCore.Monad ( DsM )
-import CoreSyn ( CoreExpr )
-import TcEvidence (HsWrapper)
+import GHC.Core ( CoreExpr )
+import TcEvidence (HsWrapper)
dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)
diff --git a/compiler/GHC/HsToCore/Coverage.hs b/compiler/GHC/HsToCore/Coverage.hs
index b93f04b3fa..960b2840fa 100644
--- a/compiler/GHC/HsToCore/Coverage.hs
+++ b/compiler/GHC/HsToCore/Coverage.hs
@@ -33,7 +33,7 @@ import Name
import Bag
import CostCentre
import CostCentreState
-import CoreSyn
+import GHC.Core
import Id
import VarSet
import Data.List
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index b627d6e841..53922768b6 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -45,9 +45,9 @@ import TcType
import TcEvidence
import TcRnMonad
import Type
-import CoreSyn
-import CoreUtils
-import MkCore
+import GHC.Core
+import GHC.Core.Utils
+import GHC.Core.Make
import GHC.Driver.Session
import CostCentre
@@ -251,7 +251,7 @@ dsLExpr (L loc e)
-- polymorphic. This should be used when the resulting expression will
-- be an argument to some other function.
-- See Note [Levity polymorphism checking] in GHC.HsToCore.Monad
--- See Note [Levity polymorphism invariants] in CoreSyn
+-- See Note [Levity polymorphism invariants] in GHC.Core
dsLExprNoLP :: LHsExpr GhcTc -> DsM CoreExpr
dsLExprNoLP (L loc e)
= putSrcSpanDs loc $
@@ -401,7 +401,7 @@ dsExpr (ExplicitTuple _ tup_args boxity)
-- The reverse is because foldM goes left-to-right
(\(lam_vars, args) -> mkCoreLams lam_vars $
mkCoreTupBoxity boxity args) }
- -- See Note [Don't flatten tuples from HsSyn] in MkCore
+ -- See Note [Don't flatten tuples from HsSyn] in GHC.Core.Make
dsExpr (ExplicitSum types alt arity expr)
= do { dsWhenNoErrs (dsLExprNoLP expr)
@@ -1112,7 +1112,7 @@ badMonadBind rhs elt_ty
Note [Detecting forced eta expansion]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We cannot have levity polymorphic function arguments. See
-Note [Levity polymorphism invariants] in CoreSyn. But we *can* have
+Note [Levity polymorphism invariants] in GHC.Core. But we *can* have
functions that take levity polymorphic arguments, as long as these
functions are eta-reduced. (See #12708 for an example.)
diff --git a/compiler/GHC/HsToCore/Expr.hs-boot b/compiler/GHC/HsToCore/Expr.hs-boot
index b717c1bee8..e742ac5156 100644
--- a/compiler/GHC/HsToCore/Expr.hs-boot
+++ b/compiler/GHC/HsToCore/Expr.hs-boot
@@ -1,7 +1,7 @@
module GHC.HsToCore.Expr where
import GHC.Hs ( HsExpr, LHsExpr, LHsLocalBinds, LPat, SyntaxExpr )
import GHC.HsToCore.Monad ( DsM, MatchResult )
-import CoreSyn ( CoreExpr )
+import GHC.Core ( CoreExpr )
import GHC.Hs.Extension ( GhcTc)
dsExpr :: HsExpr GhcTc -> DsM CoreExpr
diff --git a/compiler/GHC/HsToCore/Foreign/Call.hs b/compiler/GHC/HsToCore/Foreign/Call.hs
index bebb677772..72b3d996f0 100644
--- a/compiler/GHC/HsToCore/Foreign/Call.hs
+++ b/compiler/GHC/HsToCore/Foreign/Call.hs
@@ -24,11 +24,11 @@ where
import GhcPrelude
-import CoreSyn
+import GHC.Core
import GHC.HsToCore.Monad
-import CoreUtils
-import MkCore
+import GHC.Core.Utils
+import GHC.Core.Make
import MkId
import ForeignCall
import DataCon
diff --git a/compiler/GHC/HsToCore/Foreign/Decl.hs b/compiler/GHC/HsToCore/Foreign/Decl.hs
index dc569bdbfa..686380ee39 100644
--- a/compiler/GHC/HsToCore/Foreign/Decl.hs
+++ b/compiler/GHC/HsToCore/Foreign/Decl.hs
@@ -20,14 +20,14 @@ import GhcPrelude
import TcRnMonad -- temp
-import CoreSyn
+import GHC.Core
import GHC.HsToCore.Foreign.Call
import GHC.HsToCore.Monad
import GHC.Hs
import DataCon
-import CoreUnfold
+import GHC.Core.Unfold
import Id
import Literal
import Module
diff --git a/compiler/GHC/HsToCore/GuardedRHSs.hs b/compiler/GHC/HsToCore/GuardedRHSs.hs
index 37a7cd591b..ef055b0caa 100644
--- a/compiler/GHC/HsToCore/GuardedRHSs.hs
+++ b/compiler/GHC/HsToCore/GuardedRHSs.hs
@@ -19,9 +19,9 @@ import {-# SOURCE #-} GHC.HsToCore.Expr ( dsLExpr, dsLocalBinds )
import {-# SOURCE #-} GHC.HsToCore.Match ( matchSinglePatVar )
import GHC.Hs
-import MkCore
-import CoreSyn
-import CoreUtils (bindNonRec)
+import GHC.Core.Make
+import GHC.Core
+import GHC.Core.Utils (bindNonRec)
import BasicTypes (Origin(FromSource))
import GHC.Driver.Session
diff --git a/compiler/GHC/HsToCore/ListComp.hs b/compiler/GHC/HsToCore/ListComp.hs
index 0411542d78..6c58be3a47 100644
--- a/compiler/GHC/HsToCore/ListComp.hs
+++ b/compiler/GHC/HsToCore/ListComp.hs
@@ -20,14 +20,14 @@ import {-# SOURCE #-} GHC.HsToCore.Expr ( dsHandleMonadicFailure, dsExpr, dsLExp
import GHC.Hs
import TcHsSyn
-import CoreSyn
-import MkCore
+import GHC.Core
+import GHC.Core.Make
import GHC.HsToCore.Monad -- the monadery used in the desugarer
import GHC.HsToCore.Utils
import GHC.Driver.Session
-import CoreUtils
+import GHC.Core.Utils
import Id
import Type
import TysWiredIn
diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs
index 0542fd5e7e..bb7134b428 100644
--- a/compiler/GHC/HsToCore/Match.hs
+++ b/compiler/GHC/HsToCore/Match.hs
@@ -34,10 +34,10 @@ import TcHsSyn
import TcEvidence
import TcRnMonad
import GHC.HsToCore.PmCheck
-import CoreSyn
+import GHC.Core
import Literal
-import CoreUtils
-import MkCore
+import GHC.Core.Utils
+import GHC.Core.Make
import GHC.HsToCore.Monad
import GHC.HsToCore.Binds
import GHC.HsToCore.GuardedRHSs
@@ -331,7 +331,7 @@ In that situation we desugar to
The *desugarer* isn't certain whether there really should be no
alternatives, so it adds a default case, as it always does. A later
pass may remove it if it's inaccessible. (See also Note [Empty case
-alternatives] in CoreSyn.)
+alternatives] in GHC.Core.)
We do *not* desugar simply to
error "empty case"
diff --git a/compiler/GHC/HsToCore/Match.hs-boot b/compiler/GHC/HsToCore/Match.hs-boot
index dbed65dd0d..6dd7729935 100644
--- a/compiler/GHC/HsToCore/Match.hs-boot
+++ b/compiler/GHC/HsToCore/Match.hs-boot
@@ -4,7 +4,7 @@ import GhcPrelude
import Var ( Id )
import TcType ( Type )
import GHC.HsToCore.Monad ( DsM, EquationInfo, MatchResult )
-import CoreSyn ( CoreExpr )
+import GHC.Core ( CoreExpr )
import GHC.Hs ( LPat, HsMatchContext, MatchGroup, LHsExpr )
import GHC.Hs.Extension ( GhcRn, GhcTc )
diff --git a/compiler/GHC/HsToCore/Match/Constructor.hs b/compiler/GHC/HsToCore/Match/Constructor.hs
index 37a9f753a6..ab662a2f0e 100644
--- a/compiler/GHC/HsToCore/Match/Constructor.hs
+++ b/compiler/GHC/HsToCore/Match/Constructor.hs
@@ -27,7 +27,7 @@ import BasicTypes ( Origin(..) )
import TcType
import GHC.HsToCore.Monad
import GHC.HsToCore.Utils
-import MkCore ( mkCoreLets )
+import GHC.Core.Make ( mkCoreLets )
import Util
import Id
import NameEnv
diff --git a/compiler/GHC/HsToCore/Match/Literal.hs b/compiler/GHC/HsToCore/Match/Literal.hs
index 2fdb1a3dd5..6c3a2d7a7e 100644
--- a/compiler/GHC/HsToCore/Match/Literal.hs
+++ b/compiler/GHC/HsToCore/Match/Literal.hs
@@ -34,8 +34,8 @@ import GHC.HsToCore.Utils
import GHC.Hs
import Id
-import CoreSyn
-import MkCore
+import GHC.Core
+import GHC.Core.Make
import TyCon
import DataCon
import TcHsSyn ( shortCutLit )
diff --git a/compiler/GHC/HsToCore/Monad.hs b/compiler/GHC/HsToCore/Monad.hs
index b13a7f3304..6c4e2f61d5 100644
--- a/compiler/GHC/HsToCore/Monad.hs
+++ b/compiler/GHC/HsToCore/Monad.hs
@@ -56,9 +56,9 @@ import GhcPrelude
import TcRnMonad
import FamInstEnv
-import CoreSyn
-import MkCore ( unitExpr )
-import CoreUtils ( exprType, isExprLevPoly )
+import GHC.Core
+import GHC.Core.Make ( unitExpr )
+import GHC.Core.Utils ( exprType, isExprLevPoly )
import GHC.Hs
import GHC.IfaceToCore
import TcMType ( checkForLevPolyX, formatLevPolyErr )
diff --git a/compiler/GHC/HsToCore/PmCheck.hs b/compiler/GHC/HsToCore/PmCheck.hs
index 2a7d70abd2..78672a6443 100644
--- a/compiler/GHC/HsToCore/PmCheck.hs
+++ b/compiler/GHC/HsToCore/PmCheck.hs
@@ -28,7 +28,7 @@ import GHC.HsToCore.PmCheck.Types
import GHC.HsToCore.PmCheck.Oracle
import GHC.HsToCore.PmCheck.Ppr
import BasicTypes (Origin, isGenerated)
-import CoreSyn (CoreExpr, Expr(Var,App))
+import GHC.Core (CoreExpr, Expr(Var,App))
import FastString (unpackFS, lengthFS)
import GHC.Driver.Session
import GHC.Hs
diff --git a/compiler/GHC/HsToCore/PmCheck/Oracle.hs b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
index c0722249d8..f538b82a13 100644
--- a/compiler/GHC/HsToCore/PmCheck/Oracle.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
@@ -42,12 +42,12 @@ import VarEnv
import UniqDFM
import Var (EvVar)
import Name
-import CoreSyn
-import CoreFVs ( exprFreeVars )
-import CoreMap
-import CoreOpt (simpleOptExpr, exprIsConApp_maybe)
-import CoreUtils (exprType)
-import MkCore (mkListExpr, mkCharExpr)
+import GHC.Core
+import GHC.Core.FVs (exprFreeVars)
+import GHC.Core.Map
+import GHC.Core.SimpleOpt (simpleOptExpr, exprIsConApp_maybe)
+import GHC.Core.Utils (exprType)
+import GHC.Core.Make (mkListExpr, mkCharExpr)
import UniqSupply
import FastString
import SrcLoc
diff --git a/compiler/GHC/HsToCore/PmCheck/Types.hs b/compiler/GHC/HsToCore/PmCheck/Types.hs
index 26e6ffc67e..4f3456908f 100644
--- a/compiler/GHC/HsToCore/PmCheck/Types.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Types.hs
@@ -52,9 +52,9 @@ import Maybes
import Type
import TyCon
import Literal
-import CoreSyn
-import CoreMap
-import CoreUtils (exprType)
+import GHC.Core
+import GHC.Core.Map
+import GHC.Core.Utils (exprType)
import PrelNames
import TysWiredIn
import TysPrim
@@ -146,7 +146,7 @@ eqConLike (PatSynCon psc1) (PatSynCon psc2)
eqConLike _ _ = PossiblyOverlap
-- | Represents the head of a match against a 'ConLike' or literal.
--- Really similar to 'CoreSyn.AltCon'.
+-- Really similar to 'GHC.Core.AltCon'.
data PmAltCon = PmAltConLike ConLike
| PmAltLit PmLit
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index d6525f83f2..fe06404b22 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -51,9 +51,9 @@ import NameEnv
import TcType
import TyCon
import TysWiredIn
-import CoreSyn
-import MkCore
-import CoreUtils
+import GHC.Core
+import GHC.Core.Make
+import GHC.Core.Utils
import SrcLoc
import Unique
import BasicTypes
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 953225e912..d11e59a0c8 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -52,11 +52,11 @@ import {-# SOURCE #-} GHC.HsToCore.Expr ( dsLExpr )
import GHC.Hs
import TcHsSyn
import TcType( tcSplitTyConApp )
-import CoreSyn
+import GHC.Core
import GHC.HsToCore.Monad
-import CoreUtils
-import MkCore
+import GHC.Core.Utils
+import GHC.Core.Make
import MkId
import Id
import Literal
@@ -168,7 +168,7 @@ will propagate that Name to all the occurrence sites, as well as
un-shadowing it, so we'll get
M.a{r8} = case e of (v:_) ->
case v of Just a{s77} -> a{s77}
-In fact, even CoreSubst.simplOptExpr will do this, and simpleOptExpr
+In fact, even GHC.Core.Subst.simplOptExpr will do this, and simpleOptExpr
runs on the output of the desugarer, so all is well by the end of
the desugaring pass.
@@ -418,7 +418,7 @@ There are a few subtleties in the desugaring of `seq`:
Consider,
f x y = x `seq` (y `seq` (# x,y #))
- The [CoreSyn let/app invariant] means that, other things being equal, because
+ The [Core let/app invariant] means that, other things being equal, because
the argument to the outer 'seq' has an unlifted type, we'll use call-by-value thus:
f x y = case (y `seq` (# x,y #)) of v -> x `seq` v
@@ -490,21 +490,21 @@ mkCoreAppDs _ (Var f `App` Type _r `App` Type ty1 `App` Type ty2 `App` arg1) arg
-> v1 -- Note [Desugaring seq], points (2) and (3)
_ -> mkWildValBinder ty1
-mkCoreAppDs s fun arg = mkCoreApp s fun arg -- The rest is done in MkCore
+mkCoreAppDs s fun arg = mkCoreApp s fun arg -- The rest is done in GHC.Core.Make
-- NB: No argument can be levity polymorphic
mkCoreAppsDs :: SDoc -> CoreExpr -> [CoreExpr] -> CoreExpr
mkCoreAppsDs s fun args = foldl' (mkCoreAppDs s) fun args
mkCastDs :: CoreExpr -> Coercion -> CoreExpr
--- We define a desugarer-specific version of CoreUtils.mkCast,
+-- We define a desugarer-specific version of GHC.Core.Utils.mkCast,
-- because in the immediate output of the desugarer, we can have
-- apparently-mis-matched coercions: E.g.
-- let a = b
-- in (x :: a) |> (co :: b ~ Int)
-- Lint know about type-bindings for let and does not complain
-- So here we do not make the assertion checks that we make in
--- CoreUtils.mkCast; and we do less peephole optimisation too
+-- GHC.Core.Utils.mkCast; and we do less peephole optimisation too
mkCastDs e co | isReflCo co = e
| otherwise = Cast e co