diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-18 10:44:56 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-29 17:28:51 -0400 |
commit | 1941ef4f050c0dfcb68229641fcbbde3a10f1072 (patch) | |
tree | 8e25a61af77696d3022d35cc277b5db5af540f03 | |
parent | 1c446220250dcada51d4bb33a0cc7d8ce572e8b6 (diff) | |
download | haskell-1941ef4f050c0dfcb68229641fcbbde3a10f1072.tar.gz |
Modules: Types (#13009)
Update Haddock submodule
Metric Increase:
haddock.compiler
458 files changed, 2411 insertions, 2383 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index 13beb050af..4c61779602 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -313,12 +313,12 @@ import GHC.Iface.Load ( loadSysInterface ) import TcRnTypes import GHC.Core.Predicate import GHC.Driver.Packages -import NameSet -import RdrName +import GHC.Types.Name.Set +import GHC.Types.Name.Reader import GHC.Hs import GHC.Core.Type hiding( typeKind ) import TcType -import Id +import GHC.Types.Id import TysPrim ( alphaTyVars ) import GHC.Core.TyCon import GHC.Core.TyCo.Ppr ( pprForAll ) @@ -327,9 +327,9 @@ import GHC.Core.DataCon import GHC.Core.FVs ( orphNamesOfFamInst ) import GHC.Core.FamInstEnv ( FamInst, famInstEnvElts ) import GHC.Core.InstEnv -import Name hiding ( varName ) -import Avail -import SrcLoc +import GHC.Types.Name hiding ( varName ) +import GHC.Types.Avail +import GHC.Types.SrcLoc import GHC.Core import GHC.Iface.Tidy import GHC.Driver.Phases ( Phase(..), isHaskellSrcFilename ) @@ -340,8 +340,8 @@ import GHC.Driver.Session hiding (WarnReason(..)) import GHC.Driver.Ways import SysTools import SysTools.BaseDir -import Annotations -import Module +import GHC.Types.Annotations +import GHC.Types.Module import Panic import GHC.Platform import Bag ( listToBag ) @@ -350,13 +350,13 @@ import MonadUtils import Util import StringBuffer import Outputable -import BasicTypes +import GHC.Types.Basic import FastString import qualified Parser import Lexer import ApiAnnotation import qualified GHC.LanguageExtensions as LangExt -import NameEnv +import GHC.Types.Name.Env import TcRnDriver import Inst import FamInst diff --git a/compiler/GHC/ByteCode/Asm.hs b/compiler/GHC/ByteCode/Asm.hs index 264dcdf980..f957215d38 100644 --- a/compiler/GHC/ByteCode/Asm.hs +++ b/compiler/GHC/ByteCode/Asm.hs @@ -24,9 +24,9 @@ import GHCi.RemoteTypes import GHC.Runtime.Interpreter import GHC.Driver.Types -import Name -import NameSet -import Literal +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Literal import GHC.Core.TyCon import FastString import GHC.StgToCmm.Layout ( ArgRep(..) ) @@ -35,8 +35,8 @@ import GHC.Driver.Session import Outputable import GHC.Platform import Util -import Unique -import UniqDSet +import GHC.Types.Unique +import GHC.Types.Unique.DSet -- From iserv import SizedSeq diff --git a/compiler/GHC/ByteCode/InfoTable.hs b/compiler/GHC/ByteCode/InfoTable.hs index f5082717f3..93fc4970c4 100644 --- a/compiler/GHC/ByteCode/InfoTable.hs +++ b/compiler/GHC/ByteCode/InfoTable.hs @@ -15,8 +15,8 @@ import GHC.ByteCode.Types import GHC.Runtime.Interpreter import GHC.Driver.Session import GHC.Driver.Types -import Name ( Name, getName ) -import NameEnv +import GHC.Types.Name ( Name, getName ) +import GHC.Types.Name.Env import GHC.Core.DataCon ( DataCon, dataConRepArgTys, dataConIdentity ) import GHC.Core.TyCon ( TyCon, tyConFamilySize, isDataTyCon, tyConDataCons ) import GHC.Types.RepType diff --git a/compiler/GHC/ByteCode/Instr.hs b/compiler/GHC/ByteCode/Instr.hs index 8643752e2b..be1da0a2ef 100644 --- a/compiler/GHC/ByteCode/Instr.hs +++ b/compiler/GHC/ByteCode/Instr.hs @@ -20,13 +20,13 @@ import GHC.StgToCmm.Layout ( ArgRep(..) ) import GHC.Core.Ppr import Outputable import FastString -import Name -import Unique -import Id +import GHC.Types.Name +import GHC.Types.Unique +import GHC.Types.Id import GHC.Core -import Literal +import GHC.Types.Literal import GHC.Core.DataCon -import VarSet +import GHC.Types.Var.Set import PrimOp import GHC.Runtime.Heap.Layout diff --git a/compiler/GHC/ByteCode/Linker.hs b/compiler/GHC/ByteCode/Linker.hs index 1e77b0967e..0e0dc3ca92 100644 --- a/compiler/GHC/ByteCode/Linker.hs +++ b/compiler/GHC/ByteCode/Linker.hs @@ -28,10 +28,10 @@ import SizedSeq import GHC.Runtime.Interpreter import GHC.ByteCode.Types import GHC.Driver.Types -import Name -import NameEnv +import GHC.Types.Name +import GHC.Types.Name.Env import PrimOp -import Module +import GHC.Types.Module import FastString import Panic import Outputable diff --git a/compiler/GHC/ByteCode/Types.hs b/compiler/GHC/ByteCode/Types.hs index 491c4f99f9..dbd5152b5c 100644 --- a/compiler/GHC/ByteCode/Types.hs +++ b/compiler/GHC/ByteCode/Types.hs @@ -16,14 +16,14 @@ module GHC.ByteCode.Types import GhcPrelude import FastString -import Id -import Name -import NameEnv +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Name.Env import Outputable import PrimOp import SizedSeq import GHC.Core.Type -import SrcLoc +import GHC.Types.SrcLoc import GHCi.BreakArray import GHCi.RemoteTypes import GHCi.FFI diff --git a/compiler/GHC/Cmm.hs b/compiler/GHC/Cmm.hs index f8cf5789d7..d52c3ad801 100644 --- a/compiler/GHC/Cmm.hs +++ b/compiler/GHC/Cmm.hs @@ -26,8 +26,8 @@ module GHC.Cmm ( import GhcPrelude -import Id -import CostCentre +import GHC.Types.Id +import GHC.Types.CostCentre import GHC.Cmm.CLabel import GHC.Cmm.BlockId import GHC.Cmm.Node diff --git a/compiler/GHC/Cmm/BlockId.hs b/compiler/GHC/Cmm/BlockId.hs index f7f369551b..e458c29902 100644 --- a/compiler/GHC/Cmm/BlockId.hs +++ b/compiler/GHC/Cmm/BlockId.hs @@ -11,10 +11,10 @@ module GHC.Cmm.BlockId import GhcPrelude import GHC.Cmm.CLabel -import IdInfo -import Name -import Unique -import UniqSupply +import GHC.Types.Id.Info +import GHC.Types.Name +import GHC.Types.Unique +import GHC.Types.Unique.Supply import GHC.Cmm.Dataflow.Label (Label, mkHooplLabel) diff --git a/compiler/GHC/Cmm/BlockId.hs-boot b/compiler/GHC/Cmm/BlockId.hs-boot index 76fd6180a9..4588ce1282 100644 --- a/compiler/GHC/Cmm/BlockId.hs-boot +++ b/compiler/GHC/Cmm/BlockId.hs-boot @@ -1,7 +1,7 @@ module GHC.Cmm.BlockId (BlockId, mkBlockId) where import GHC.Cmm.Dataflow.Label (Label) -import Unique (Unique) +import GHC.Types.Unique (Unique) type BlockId = Label diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index eea71d0ce9..89fa2f8867 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -115,20 +115,20 @@ module GHC.Cmm.CLabel ( import GhcPrelude -import IdInfo -import BasicTypes +import GHC.Types.Id.Info +import GHC.Types.Basic import {-# SOURCE #-} GHC.Cmm.BlockId (BlockId, mkBlockId) import GHC.Driver.Packages -import Module -import Name -import Unique +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Unique import PrimOp -import CostCentre +import GHC.Types.CostCentre import Outputable import FastString import GHC.Driver.Session import GHC.Platform -import UniqSet +import GHC.Types.Unique.Set import Util import GHC.Core.Ppr ( {- instances -} ) diff --git a/compiler/GHC/Cmm/CommonBlockElim.hs b/compiler/GHC/Cmm/CommonBlockElim.hs index 29f019fa15..575e041e73 100644 --- a/compiler/GHC/Cmm/CommonBlockElim.hs +++ b/compiler/GHC/Cmm/CommonBlockElim.hs @@ -25,8 +25,8 @@ import Data.Word import qualified Data.Map as M import Outputable import qualified TrieMap as TM -import UniqFM -import Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique import Control.Arrow (first, second) -- ----------------------------------------------------------------------------- diff --git a/compiler/GHC/Cmm/Dataflow.hs b/compiler/GHC/Cmm/Dataflow.hs index 4f900c32ac..d697240191 100644 --- a/compiler/GHC/Cmm/Dataflow.hs +++ b/compiler/GHC/Cmm/Dataflow.hs @@ -37,7 +37,7 @@ where import GhcPrelude import GHC.Cmm -import UniqSupply +import GHC.Types.Unique.Supply import Data.Array import Data.Maybe diff --git a/compiler/GHC/Cmm/Dataflow/Label.hs b/compiler/GHC/Cmm/Dataflow/Label.hs index b27ff341e5..70027570d3 100644 --- a/compiler/GHC/Cmm/Dataflow/Label.hs +++ b/compiler/GHC/Cmm/Dataflow/Label.hs @@ -20,7 +20,7 @@ import Outputable -- TODO: This should really just use GHC's Unique and Uniq{Set,FM} import GHC.Cmm.Dataflow.Collections -import Unique (Uniquable(..)) +import GHC.Types.Unique (Uniquable(..)) import TrieMap diff --git a/compiler/GHC/Cmm/DebugBlock.hs b/compiler/GHC/Cmm/DebugBlock.hs index 9d2da26b93..2129b3e7aa 100644 --- a/compiler/GHC/Cmm/DebugBlock.hs +++ b/compiler/GHC/Cmm/DebugBlock.hs @@ -34,10 +34,10 @@ import GHC.Cmm import GHC.Cmm.Utils import GHC.Core import FastString ( nilFS, mkFastString ) -import Module +import GHC.Types.Module import Outputable import GHC.Cmm.Ppr.Expr ( pprExpr ) -import SrcLoc +import GHC.Types.SrcLoc import Util ( seqList ) import GHC.Cmm.Dataflow.Block diff --git a/compiler/GHC/Cmm/Expr.hs b/compiler/GHC/Cmm/Expr.hs index 3c92c1e61b..1600588e2c 100644 --- a/compiler/GHC/Cmm/Expr.hs +++ b/compiler/GHC/Cmm/Expr.hs @@ -40,12 +40,12 @@ import GHC.Cmm.MachOp import GHC.Cmm.Type import GHC.Driver.Session import Outputable (panic) -import Unique +import GHC.Types.Unique import Data.Set (Set) import qualified Data.Set as Set -import BasicTypes (Alignment, mkAlignment, alignmentOf) +import GHC.Types.Basic (Alignment, mkAlignment, alignmentOf) ----------------------------------------------------------------------------- -- CmmExpr diff --git a/compiler/GHC/Cmm/Graph.hs b/compiler/GHC/Cmm/Graph.hs index 413bce3f1e..01fa4dc955 100644 --- a/compiler/GHC/Cmm/Graph.hs +++ b/compiler/GHC/Cmm/Graph.hs @@ -33,10 +33,10 @@ import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import OrdList import GHC.Runtime.Heap.Layout (ByteOff) -import UniqSupply +import GHC.Types.Unique.Supply import Util import Panic diff --git a/compiler/GHC/Cmm/Info.hs b/compiler/GHC/Cmm/Info.hs index 7a1bc2d3d1..6da996ad45 100644 --- a/compiler/GHC/Cmm/Info.hs +++ b/compiler/GHC/Cmm/Info.hs @@ -49,7 +49,7 @@ import Maybes import GHC.Driver.Session import ErrUtils (withTimingSilent) import Panic -import UniqSupply +import GHC.Types.Unique.Supply import MonadUtils import Util import Outputable diff --git a/compiler/GHC/Cmm/Info/Build.hs b/compiler/GHC/Cmm/Info/Build.hs index 274345ab7a..6c8551587b 100644 --- a/compiler/GHC/Cmm/Info/Build.hs +++ b/compiler/GHC/Cmm/Info/Build.hs @@ -10,15 +10,15 @@ module GHC.Cmm.Info.Build import GhcPrelude hiding (succ) -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Cmm.BlockId import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow -import Module +import GHC.Types.Module import GHC.Platform import Digraph import GHC.Cmm.CLabel @@ -28,8 +28,8 @@ import GHC.Driver.Session import Maybes import Outputable import GHC.Runtime.Heap.Layout -import UniqSupply -import CostCentre +import GHC.Types.Unique.Supply +import GHC.Types.CostCentre import GHC.StgToCmm.Heap import Control.Monad @@ -41,7 +41,7 @@ import Control.Monad.Trans.State import Control.Monad.Trans.Class import Data.List (unzip4) -import NameSet +import GHC.Types.Name.Set {- Note [SRTs] diff --git a/compiler/GHC/Cmm/LayoutStack.hs b/compiler/GHC/Cmm/LayoutStack.hs index ba480a25b7..4cf7fcfdc1 100644 --- a/compiler/GHC/Cmm/LayoutStack.hs +++ b/compiler/GHC/Cmm/LayoutStack.hs @@ -8,14 +8,14 @@ import GhcPrelude hiding ((<*>)) import GHC.StgToCmm.Utils ( callerSaveVolatileRegs, newTemp ) -- XXX layering violation import GHC.StgToCmm.Foreign ( saveThreadState, loadThreadState ) -- XXX layering violation -import BasicTypes +import GHC.Types.Basic import GHC.Cmm import GHC.Cmm.Info import GHC.Cmm.BlockId import GHC.Cmm.CLabel import GHC.Cmm.Utils import GHC.Cmm.Graph -import ForeignCall +import GHC.Types.ForeignCall import GHC.Cmm.Liveness import GHC.Cmm.ProcPoint import GHC.Runtime.Heap.Layout @@ -24,9 +24,9 @@ import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label -import UniqSupply +import GHC.Types.Unique.Supply import Maybes -import UniqFM +import GHC.Types.Unique.FM import Util import GHC.Platform diff --git a/compiler/GHC/Cmm/Lexer.x b/compiler/GHC/Cmm/Lexer.x index be2f676608..a1aebc9fb9 100644 --- a/compiler/GHC/Cmm/Lexer.x +++ b/compiler/GHC/Cmm/Lexer.x @@ -21,8 +21,8 @@ import GHC.Cmm.Expr import Lexer import GHC.Cmm.Monad -import SrcLoc -import UniqFM +import GHC.Types.SrcLoc +import GHC.Types.Unique.FM import StringBuffer import FastString import Ctype diff --git a/compiler/GHC/Cmm/Node.hs b/compiler/GHC/Cmm/Node.hs index c809a99136..98314a8da3 100644 --- a/compiler/GHC/Cmm/Node.hs +++ b/compiler/GHC/Cmm/Node.hs @@ -33,11 +33,11 @@ import GHC.Cmm.Expr import GHC.Cmm.Switch import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import Outputable import GHC.Runtime.Heap.Layout import GHC.Core (Tickish) -import qualified Unique as U +import qualified GHC.Types.Unique as U import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Graph @@ -45,7 +45,7 @@ import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Label import Data.Maybe import Data.List (tails,sortBy) -import Unique (nonDetCmpUnique) +import GHC.Types.Unique (nonDetCmpUnique) import Util diff --git a/compiler/GHC/Cmm/Parser.y b/compiler/GHC/Cmm/Parser.y index 6b07af8859..cb34fbc52f 100644 --- a/compiler/GHC/Cmm/Parser.y +++ b/compiler/GHC/Cmm/Parser.y @@ -234,14 +234,14 @@ import GHC.Cmm.Monad import GHC.Runtime.Heap.Layout import Lexer -import CostCentre -import ForeignCall -import Module +import GHC.Types.CostCentre +import GHC.Types.ForeignCall +import GHC.Types.Module import GHC.Platform -import Literal -import Unique -import UniqFM -import SrcLoc +import GHC.Types.Literal +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.SrcLoc import GHC.Driver.Session import ErrUtils import StringBuffer @@ -249,9 +249,9 @@ import FastString import Panic import Constants import Outputable -import BasicTypes +import GHC.Types.Basic import Bag ( emptyBag, unitBag ) -import Var +import GHC.Types.Var import Control.Monad import Data.Array diff --git a/compiler/GHC/Cmm/Pipeline.hs b/compiler/GHC/Cmm/Pipeline.hs index a2d47b3d48..e730cfda40 100644 --- a/compiler/GHC/Cmm/Pipeline.hs +++ b/compiler/GHC/Cmm/Pipeline.hs @@ -22,7 +22,7 @@ import GHC.Cmm.LayoutStack import GHC.Cmm.Sink import GHC.Cmm.Dataflow.Collections -import UniqSupply +import GHC.Types.Unique.Supply import GHC.Driver.Session import ErrUtils import GHC.Driver.Types diff --git a/compiler/GHC/Cmm/Ppr.hs b/compiler/GHC/Cmm/Ppr.hs index 324fc8f1b1..d37b960c80 100644 --- a/compiler/GHC/Cmm/Ppr.hs +++ b/compiler/GHC/Cmm/Ppr.hs @@ -54,7 +54,7 @@ import GHC.Cmm.Ppr.Decl import GHC.Cmm.Ppr.Expr import Util -import BasicTypes +import GHC.Types.Basic import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Graph diff --git a/compiler/GHC/Cmm/ProcPoint.hs b/compiler/GHC/Cmm/ProcPoint.hs index 42bd342e86..9017c0eb0c 100644 --- a/compiler/GHC/Cmm/ProcPoint.hs +++ b/compiler/GHC/Cmm/ProcPoint.hs @@ -25,7 +25,7 @@ import Maybes import Control.Monad import Outputable import GHC.Platform -import UniqSupply +import GHC.Types.Unique.Supply import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow diff --git a/compiler/GHC/Cmm/Sink.hs b/compiler/GHC/Cmm/Sink.hs index 5dd7fac1d0..3ca4fe9c75 100644 --- a/compiler/GHC/Cmm/Sink.hs +++ b/compiler/GHC/Cmm/Sink.hs @@ -17,8 +17,8 @@ import GHC.Platform.Regs import GHC.Platform import GHC.Driver.Session -import Unique -import UniqFM +import GHC.Types.Unique +import GHC.Types.Unique.FM import qualified Data.IntSet as IntSet import Data.List (partition) diff --git a/compiler/GHC/Cmm/Switch/Implement.hs b/compiler/GHC/Cmm/Switch/Implement.hs index 7df32dd2e8..b098917711 100644 --- a/compiler/GHC/Cmm/Switch/Implement.hs +++ b/compiler/GHC/Cmm/Switch/Implement.hs @@ -12,7 +12,7 @@ import GHC.Cmm.BlockId import GHC.Cmm import GHC.Cmm.Utils import GHC.Cmm.Switch -import UniqSupply +import GHC.Types.Unique.Supply import GHC.Driver.Session import MonadUtils (concatMapM) diff --git a/compiler/GHC/Cmm/Utils.hs b/compiler/GHC/Cmm/Utils.hs index 90cbaffd5f..82cb75a904 100644 --- a/compiler/GHC/Cmm/Utils.hs +++ b/compiler/GHC/Cmm/Utils.hs @@ -83,7 +83,7 @@ import GHC.Cmm.BlockId import GHC.Cmm.CLabel import Outputable import GHC.Driver.Session -import Unique +import GHC.Types.Unique import GHC.Platform.Regs import Data.ByteString (ByteString) diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 5b1847013c..4ccdad826d 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -83,19 +83,19 @@ import GHC.Cmm.Opt ( cmmMachOpFold ) import GHC.Cmm.Ppr import GHC.Cmm.CLabel -import UniqFM -import UniqSupply +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import GHC.Driver.Session import Util -import BasicTypes ( Alignment ) +import GHC.Types.Basic ( Alignment ) import qualified Pretty import BufWrite import Outputable import FastString -import UniqSet +import GHC.Types.Unique.Set import ErrUtils -import Module +import GHC.Types.Module import Stream (Stream) import qualified Stream diff --git a/compiler/GHC/CmmToAsm/BlockLayout.hs b/compiler/GHC/CmmToAsm/BlockLayout.hs index 0665e71433..7ff90e8c40 100644 --- a/compiler/GHC/CmmToAsm/BlockLayout.hs +++ b/compiler/GHC/CmmToAsm/BlockLayout.hs @@ -27,9 +27,9 @@ import GHC.Cmm.Dataflow.Label import GHC.Platform import GHC.Driver.Session (gopt, GeneralFlag(..), DynFlags, targetPlatform) -import UniqFM +import GHC.Types.Unique.FM import Util -import Unique +import GHC.Types.Unique import Digraph import Outputable diff --git a/compiler/GHC/CmmToAsm/CFG.hs b/compiler/GHC/CmmToAsm/CFG.hs index 0995ecab61..dca02b0eb5 100644 --- a/compiler/GHC/CmmToAsm/CFG.hs +++ b/compiler/GHC/CmmToAsm/CFG.hs @@ -60,7 +60,7 @@ import Util import Digraph import Maybes -import Unique +import GHC.Types.Unique import qualified GHC.CmmToAsm.CFG.Dominators as Dom import Data.IntMap.Strict (IntMap) import Data.IntSet (IntSet) diff --git a/compiler/GHC/CmmToAsm/Dwarf.hs b/compiler/GHC/CmmToAsm/Dwarf.hs index 9270a308a8..8075bdd27e 100644 --- a/compiler/GHC/CmmToAsm/Dwarf.hs +++ b/compiler/GHC/CmmToAsm/Dwarf.hs @@ -10,11 +10,11 @@ import Config ( cProjectName, cProjectVersion ) import GHC.Core ( Tickish(..) ) import GHC.Cmm.DebugBlock import GHC.Driver.Session -import Module +import GHC.Types.Module import Outputable import GHC.Platform -import Unique -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Supply import GHC.CmmToAsm.Dwarf.Constants import GHC.CmmToAsm.Dwarf.Types diff --git a/compiler/GHC/CmmToAsm/Dwarf/Types.hs b/compiler/GHC/CmmToAsm/Dwarf/Types.hs index c54815aff7..eaeb570595 100644 --- a/compiler/GHC/CmmToAsm/Dwarf/Types.hs +++ b/compiler/GHC/CmmToAsm/Dwarf/Types.hs @@ -31,9 +31,9 @@ import Encoding import FastString import Outputable import GHC.Platform -import Unique +import GHC.Types.Unique import GHC.Platform.Reg -import SrcLoc +import GHC.Types.SrcLoc import Util import GHC.CmmToAsm.Dwarf.Constants diff --git a/compiler/GHC/CmmToAsm/Monad.hs b/compiler/GHC/CmmToAsm/Monad.hs index 89e64d5e79..f6e5515705 100644 --- a/compiler/GHC/CmmToAsm/Monad.hs +++ b/compiler/GHC/CmmToAsm/Monad.hs @@ -60,11 +60,11 @@ import GHC.Cmm.Dataflow.Label import GHC.Cmm.CLabel ( CLabel ) import GHC.Cmm.DebugBlock import FastString ( FastString ) -import UniqFM -import UniqSupply -import Unique ( Unique ) +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply +import GHC.Types.Unique ( Unique ) import GHC.Driver.Session -import Module +import GHC.Types.Module import Control.Monad ( ap ) diff --git a/compiler/GHC/CmmToAsm/PIC.hs b/compiler/GHC/CmmToAsm/PIC.hs index a9668133fc..cb7d82a6c5 100644 --- a/compiler/GHC/CmmToAsm/PIC.hs +++ b/compiler/GHC/CmmToAsm/PIC.hs @@ -70,8 +70,8 @@ import GHC.Cmm.CLabel ( CLabel, ForeignLabelSource(..), pprCLabel, import GHC.Cmm.CLabel ( mkForeignLabel ) -import BasicTypes -import Module +import GHC.Types.Basic +import GHC.Types.Module import Outputable diff --git a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs index d597051b54..e5177b80b3 100644 --- a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs @@ -63,7 +63,7 @@ import Control.Monad ( mapAndUnzipM, when ) import Data.Bits import Data.Word -import BasicTypes +import GHC.Types.Basic import FastString import Util diff --git a/compiler/GHC/CmmToAsm/PPC/Instr.hs b/compiler/GHC/CmmToAsm/PPC/Instr.hs index 26742b5a17..e622d801a8 100644 --- a/compiler/GHC/CmmToAsm/PPC/Instr.hs +++ b/compiler/GHC/CmmToAsm/PPC/Instr.hs @@ -45,8 +45,8 @@ import FastString import GHC.Cmm.CLabel import Outputable import GHC.Platform -import UniqFM (listToUFM, lookupUFM) -import UniqSupply +import GHC.Types.Unique.FM (listToUFM, lookupUFM) +import GHC.Types.Unique.Supply import Control.Monad (replicateM) import Data.Maybe (fromMaybe) diff --git a/compiler/GHC/CmmToAsm/PPC/Ppr.hs b/compiler/GHC/CmmToAsm/PPC/Ppr.hs index a66d1c2f99..90b85023a2 100644 --- a/compiler/GHC/CmmToAsm/PPC/Ppr.hs +++ b/compiler/GHC/CmmToAsm/PPC/Ppr.hs @@ -30,7 +30,7 @@ import GHC.Cmm.BlockId import GHC.Cmm.CLabel import GHC.Cmm.Ppr.Expr () -- For Outputable instances -import Unique ( pprUniqueAlways, getUnique ) +import GHC.Types.Unique ( pprUniqueAlways, getUnique ) import GHC.Platform import FastString import Outputable diff --git a/compiler/GHC/CmmToAsm/PPC/RegInfo.hs b/compiler/GHC/CmmToAsm/PPC/RegInfo.hs index a75040d703..5a48ed28e0 100644 --- a/compiler/GHC/CmmToAsm/PPC/RegInfo.hs +++ b/compiler/GHC/CmmToAsm/PPC/RegInfo.hs @@ -27,7 +27,7 @@ import GHC.Cmm.BlockId import GHC.Cmm import GHC.Cmm.CLabel -import Unique +import GHC.Types.Unique import Outputable (ppr, text, Outputable, (<>)) data JumpDest = DestBlockId BlockId diff --git a/compiler/GHC/CmmToAsm/PPC/Regs.hs b/compiler/GHC/CmmToAsm/PPC/Regs.hs index 90f8a62ab7..86675daf5f 100644 --- a/compiler/GHC/CmmToAsm/PPC/Regs.hs +++ b/compiler/GHC/CmmToAsm/PPC/Regs.hs @@ -57,7 +57,7 @@ import GHC.CmmToAsm.Format import GHC.Cmm import GHC.Cmm.CLabel ( CLabel ) -import Unique +import GHC.Types.Unique import GHC.Platform.Regs import Outputable diff --git a/compiler/GHC/CmmToAsm/Reg/Graph.hs b/compiler/GHC/CmmToAsm/Reg/Graph.hs index 7f0cacfcb4..443072b246 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph.hs @@ -23,9 +23,9 @@ import GHC.Platform.Reg import Bag import Outputable import GHC.Platform -import UniqFM -import UniqSet -import UniqSupply +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set +import GHC.Types.Unique.Supply import Util (seqList) import GHC.CmmToAsm.CFG diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs index 95fa174415..ba3f825149 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs @@ -24,9 +24,9 @@ module GHC.CmmToAsm.Reg.Graph.Base ( import GhcPrelude -import UniqSet -import UniqFM -import Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique import MonadUtils (concatMapM) diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs index d223137dd0..dd28981261 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs @@ -12,9 +12,9 @@ import GHC.Platform.Reg import GHC.Cmm import Bag import Digraph -import UniqFM -import UniqSet -import UniqSupply +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set +import GHC.Types.Unique.Supply -- | Do register coalescing on this top level thing diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs index a0e11433f7..5ae55334a2 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs @@ -18,10 +18,10 @@ import GHC.Cmm.Dataflow.Collections import MonadUtils import State -import Unique -import UniqFM -import UniqSet -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set +import GHC.Types.Unique.Supply import Outputable import GHC.Platform diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs index 6d14c7194b..ac784582e7 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs @@ -37,9 +37,9 @@ import GHC.Platform.Reg import GHC.Cmm.BlockId import GHC.Cmm -import UniqSet -import UniqFM -import Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique import State import Outputable import GHC.Platform diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs b/compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs index e3e456e98d..6484a38d79 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs @@ -25,8 +25,8 @@ import GraphBase import GHC.Cmm.Dataflow.Collections (mapLookup) import GHC.Cmm.Dataflow.Label import GHC.Cmm -import UniqFM -import UniqSet +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Digraph (flattenSCCs) import Outputable import GHC.Platform diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs index 2285d3e908..a06a22fa05 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs @@ -30,8 +30,8 @@ import GHC.CmmToAsm.Reg.Target import GHC.Platform import Outputable -import UniqFM -import UniqSet +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import State -- | Holds interesting statistics from the register allocator. diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs index ec7c5ad13e..4cf3d98eb1 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs @@ -15,7 +15,7 @@ import GHC.Platform.Reg import GraphBase -import UniqSet +import GHC.Types.Unique.Set import GHC.Platform import Panic diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/X86.hs b/compiler/GHC/CmmToAsm/Reg/Graph/X86.hs index 0d4c56ba21..c673c69c1d 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/X86.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/X86.hs @@ -18,7 +18,7 @@ module GHC.CmmToAsm.Reg.Graph.X86 ( import GhcPrelude import GHC.CmmToAsm.Reg.Graph.Base (Reg(..), RegSub(..), RegClass(..)) -import UniqSet +import GHC.Types.Unique.Set import qualified Data.Array as A diff --git a/compiler/GHC/CmmToAsm/Reg/Linear.hs b/compiler/GHC/CmmToAsm/Reg/Linear.hs index 155d67c2c2..a093bad83a 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear.hs @@ -127,10 +127,10 @@ import GHC.Cmm.Dataflow.Collections import GHC.Cmm hiding (RegSet) import Digraph -import Unique -import UniqSet -import UniqFM -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import Outputable import GHC.Platform diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/Base.hs b/compiler/GHC/CmmToAsm/Reg/Linear/Base.hs index 92b3ee19a3..95036adb26 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/Base.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/Base.hs @@ -25,9 +25,9 @@ import GHC.CmmToAsm.Config import GHC.Platform.Reg import Outputable -import Unique -import UniqFM -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import GHC.Cmm.BlockId diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs b/compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs index 0874cd0dbf..55735913d4 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs @@ -24,9 +24,9 @@ import GHC.Cmm.BlockId import GHC.Cmm.Dataflow.Collections import Digraph import Outputable -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set -- | For a jump instruction at the end of a block, generate fixup code so its -- vregs are in the correct regs for its destination. diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs b/compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs index 00fcfd91c8..c2477fc18f 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs @@ -22,8 +22,8 @@ where import GhcPrelude -import UniqFM -import Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique -- | Identifier for a stack slot. diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/State.hs b/compiler/GHC/CmmToAsm/Reg/Linear/State.hs index 5a1e3a4c3f..cf8913e211 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/State.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/State.hs @@ -50,8 +50,8 @@ import GHC.Platform.Reg import GHC.Cmm.BlockId import GHC.Platform -import Unique -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Supply import Control.Monad (ap) diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/Stats.hs b/compiler/GHC/CmmToAsm/Reg/Linear/Stats.hs index 1176b220a3..84acc3a417 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/Stats.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/Stats.hs @@ -12,7 +12,7 @@ import GHC.CmmToAsm.Reg.Linear.Base import GHC.CmmToAsm.Reg.Liveness import GHC.CmmToAsm.Instr -import UniqFM +import GHC.Types.Unique.FM import Outputable import State diff --git a/compiler/GHC/CmmToAsm/Reg/Liveness.hs b/compiler/GHC/CmmToAsm/Reg/Liveness.hs index d1c4c8f498..5f5d4c8ff3 100644 --- a/compiler/GHC/CmmToAsm/Reg/Liveness.hs +++ b/compiler/GHC/CmmToAsm/Reg/Liveness.hs @@ -53,9 +53,9 @@ import Digraph import MonadUtils import Outputable import GHC.Platform -import UniqSet -import UniqFM -import UniqSupply +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import Bag import State diff --git a/compiler/GHC/CmmToAsm/Reg/Target.hs b/compiler/GHC/CmmToAsm/Reg/Target.hs index a45d70c826..183d329790 100644 --- a/compiler/GHC/CmmToAsm/Reg/Target.hs +++ b/compiler/GHC/CmmToAsm/Reg/Target.hs @@ -28,7 +28,7 @@ import GHC.Platform.Reg.Class import GHC.CmmToAsm.Format import Outputable -import Unique +import GHC.Types.Unique import GHC.Platform import qualified GHC.CmmToAsm.X86.Regs as X86 diff --git a/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs b/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs index 67177ea0c6..ec7d59fe02 100644 --- a/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/SPARC/CodeGen.hs @@ -52,7 +52,7 @@ import GHC.Cmm.CLabel import GHC.CmmToAsm.CPrim -- The rest: -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import FastString import OrdList diff --git a/compiler/GHC/CmmToAsm/SPARC/Ppr.hs b/compiler/GHC/CmmToAsm/SPARC/Ppr.hs index 566b23c1d6..a65ac03458 100644 --- a/compiler/GHC/CmmToAsm/SPARC/Ppr.hs +++ b/compiler/GHC/CmmToAsm/SPARC/Ppr.hs @@ -45,7 +45,7 @@ import GHC.Cmm.CLabel import GHC.Cmm.Dataflow.Label import GHC.Cmm.Dataflow.Collections -import Unique ( pprUniqueAlways ) +import GHC.Types.Unique ( pprUniqueAlways ) import Outputable import GHC.Platform import FastString diff --git a/compiler/GHC/CmmToAsm/SPARC/Regs.hs b/compiler/GHC/CmmToAsm/SPARC/Regs.hs index ba22470912..d6d5d87bf6 100644 --- a/compiler/GHC/CmmToAsm/SPARC/Regs.hs +++ b/compiler/GHC/CmmToAsm/SPARC/Regs.hs @@ -39,7 +39,7 @@ import GHC.Platform.Reg import GHC.Platform.Reg.Class import GHC.CmmToAsm.Format -import Unique +import GHC.Types.Unique import Outputable {- diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs index deabf01425..1a22fc27f0 100644 --- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs @@ -65,9 +65,9 @@ import GHC.Platform.Reg import GHC.Platform -- Our intermediate code: -import BasicTypes +import GHC.Types.Basic import GHC.Cmm.BlockId -import Module ( primUnitId ) +import GHC.Types.Module ( primUnitId ) import GHC.Cmm.Utils import GHC.Cmm.Switch import GHC.Cmm @@ -77,16 +77,16 @@ import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label import GHC.Cmm.CLabel import GHC.Core ( Tickish(..) ) -import SrcLoc ( srcSpanFile, srcSpanStartLine, srcSpanStartCol ) +import GHC.Types.SrcLoc ( srcSpanFile, srcSpanStartLine, srcSpanStartCol ) -- The rest: -import ForeignCall ( CCallConv(..) ) +import GHC.Types.ForeignCall ( CCallConv(..) ) import OrdList import Outputable import FastString import GHC.Driver.Session import Util -import UniqSupply ( getUniqueM ) +import GHC.Types.Unique.Supply ( getUniqueM ) import Control.Monad import Data.Bits diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs index 71ee322516..846ef9b72f 100644 --- a/compiler/GHC/CmmToAsm/X86/Instr.hs +++ b/compiler/GHC/CmmToAsm/X86/Instr.hs @@ -38,11 +38,11 @@ import FastString import Outputable import GHC.Platform -import BasicTypes (Alignment) +import GHC.Types.Basic (Alignment) import GHC.Cmm.CLabel -import UniqSet -import Unique -import UniqSupply +import GHC.Types.Unique.Set +import GHC.Types.Unique +import GHC.Types.Unique.Supply import GHC.Cmm.DebugBlock (UnwindTable) import Control.Monad diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs index 0dfd394d8e..357e24a9cc 100644 --- a/compiler/GHC/CmmToAsm/X86/Ppr.hs +++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs @@ -36,12 +36,12 @@ import GHC.CmmToAsm.Ppr import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Label -import BasicTypes (Alignment, mkAlignment, alignmentBytes) +import GHC.Types.Basic (Alignment, mkAlignment, alignmentBytes) import GHC.Driver.Session import GHC.Cmm hiding (topInfoTable) import GHC.Cmm.BlockId import GHC.Cmm.CLabel -import Unique ( pprUniqueAlways ) +import GHC.Types.Unique ( pprUniqueAlways ) import GHC.Platform import FastString import Outputable diff --git a/compiler/GHC/CmmToAsm/X86/RegInfo.hs b/compiler/GHC/CmmToAsm/X86/RegInfo.hs index 597efe1c3e..5b2464c415 100644 --- a/compiler/GHC/CmmToAsm/X86/RegInfo.hs +++ b/compiler/GHC/CmmToAsm/X86/RegInfo.hs @@ -15,9 +15,9 @@ import GHC.Platform.Reg import Outputable import GHC.Platform -import Unique +import GHC.Types.Unique -import UniqFM +import GHC.Types.Unique.FM import GHC.CmmToAsm.X86.Regs diff --git a/compiler/GHC/CmmToC.hs b/compiler/GHC/CmmToC.hs index 71b0793057..8b130afc7c 100644 --- a/compiler/GHC/CmmToC.hs +++ b/compiler/GHC/CmmToC.hs @@ -30,7 +30,7 @@ import GhcPrelude import GHC.Cmm.BlockId import GHC.Cmm.CLabel -import ForeignCall +import GHC.Types.ForeignCall import GHC.Cmm hiding (pprBBlock) import GHC.Cmm.Ppr () -- For Outputable instances import GHC.Cmm.Dataflow.Block @@ -45,9 +45,9 @@ import GHC.Driver.Session import FastString import Outputable import GHC.Platform -import UniqSet -import UniqFM -import Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique import Util -- The rest diff --git a/compiler/GHC/CmmToLlvm/Base.hs b/compiler/GHC/CmmToLlvm/Base.hs index b16e4cd00b..981535e993 100644 --- a/compiler/GHC/CmmToLlvm/Base.hs +++ b/compiler/GHC/CmmToLlvm/Base.hs @@ -54,11 +54,11 @@ import GHC.Cmm hiding ( succ ) import GHC.Cmm.Utils (regsOverlap) import Outputable as Outp import GHC.Platform -import UniqFM -import Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique import BufWrite ( BufHandle ) -import UniqSet -import UniqSupply +import GHC.Types.Unique.Set +import GHC.Types.Unique.Supply import ErrUtils import qualified Stream diff --git a/compiler/GHC/CmmToLlvm/CodeGen.hs b/compiler/GHC/CmmToLlvm/CodeGen.hs index a3f40ce306..7b3d198fa9 100644 --- a/compiler/GHC/CmmToLlvm/CodeGen.hs +++ b/compiler/GHC/CmmToLlvm/CodeGen.hs @@ -27,13 +27,13 @@ import GHC.Cmm.Dataflow.Collections import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import Outputable hiding (panic, pprPanic) import qualified Outputable import GHC.Platform import OrdList -import UniqSupply -import Unique +import GHC.Types.Unique.Supply +import GHC.Types.Unique import Util import Control.Monad.Trans.Class diff --git a/compiler/GHC/CmmToLlvm/Ppr.hs b/compiler/GHC/CmmToLlvm/Ppr.hs index f4540c212c..fea3d351fa 100644 --- a/compiler/GHC/CmmToLlvm/Ppr.hs +++ b/compiler/GHC/CmmToLlvm/Ppr.hs @@ -20,7 +20,7 @@ import GHC.Cmm import FastString import Outputable -import Unique +import GHC.Types.Unique -- ---------------------------------------------------------------------------- -- * Top level diff --git a/compiler/GHC/CmmToLlvm/Regs.hs b/compiler/GHC/CmmToLlvm/Regs.hs index 82a4ae18e2..6e9be62937 100644 --- a/compiler/GHC/CmmToLlvm/Regs.hs +++ b/compiler/GHC/CmmToLlvm/Regs.hs @@ -19,7 +19,7 @@ import GHC.Cmm.Expr import GHC.Platform import FastString import Outputable ( panic ) -import Unique +import GHC.Types.Unique -- | Get the LlvmVar function variable storing the real register lmGlobalRegVar :: Platform -> GlobalReg -> LlvmVar diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs index 931fa5ae86..8c354b5298 100644 --- a/compiler/GHC/Core.hs +++ b/compiler/GHC/Core.hs @@ -102,22 +102,22 @@ module GHC.Core ( import GhcPrelude import GHC.Platform -import CostCentre -import VarEnv( InScopeSet ) -import Var +import GHC.Types.CostCentre +import GHC.Types.Var.Env( InScopeSet ) +import GHC.Types.Var import GHC.Core.Type import GHC.Core.Coercion -import Name -import NameSet -import NameEnv( NameEnv, emptyNameEnv ) -import Literal +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env( NameEnv, emptyNameEnv ) +import GHC.Types.Literal import GHC.Core.DataCon -import Module -import BasicTypes +import GHC.Types.Module +import GHC.Types.Basic import Outputable import Util -import UniqSet -import SrcLoc ( RealSrcSpan, containsSpan ) +import GHC.Types.Unique.Set +import GHC.Types.SrcLoc ( RealSrcSpan, containsSpan ) import Binary import Data.Data hiding (TyCon) diff --git a/compiler/GHC/Core/Arity.hs b/compiler/GHC/Core/Arity.hs index df16701396..23e2eaf734 100644 --- a/compiler/GHC/Core/Arity.hs +++ b/compiler/GHC/Core/Arity.hs @@ -27,16 +27,16 @@ import GHC.Core import GHC.Core.FVs import GHC.Core.Utils import GHC.Core.Subst -import Demand -import Var -import VarEnv -import Id +import GHC.Types.Demand +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Id import GHC.Core.Type as Type import GHC.Core.TyCon ( initRecTc, checkRecTc ) import GHC.Core.Predicate ( isDictTy ) import GHC.Core.Coercion as Coercion -import BasicTypes -import Unique +import GHC.Types.Basic +import GHC.Types.Unique import GHC.Driver.Session ( DynFlags, GeneralFlag(..), gopt ) import Outputable import FastString diff --git a/compiler/GHC/Core/Class.hs b/compiler/GHC/Core/Class.hs index 5020ce6617..454f7015dd 100644 --- a/compiler/GHC/Core/Class.hs +++ b/compiler/GHC/Core/Class.hs @@ -28,12 +28,12 @@ import GhcPrelude import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, PredType ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) -import Var -import Name -import BasicTypes -import Unique +import GHC.Types.Var +import GHC.Types.Name +import GHC.Types.Basic +import GHC.Types.Unique import Util -import SrcLoc +import GHC.Types.SrcLoc import Outputable import BooleanFormula (BooleanFormula, mkTrue) diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs index 06dfa2e02b..06de44f65b 100644 --- a/compiler/GHC/Core/Coercion.hs +++ b/compiler/GHC/Core/Coercion.hs @@ -132,21 +132,21 @@ import GHC.Core.TyCo.Tidy import GHC.Core.Type import GHC.Core.TyCon import GHC.Core.Coercion.Axiom -import Var -import VarEnv -import VarSet -import Name hiding ( varName ) +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Name hiding ( varName ) import Util -import BasicTypes +import GHC.Types.Basic import Outputable -import Unique +import GHC.Types.Unique import Pair -import SrcLoc +import GHC.Types.SrcLoc import PrelNames import TysPrim import ListSetOps import Maybes -import UniqFM +import GHC.Types.Unique.FM import Control.Monad (foldM, zipWithM) import Data.Function ( on ) diff --git a/compiler/GHC/Core/Coercion.hs-boot b/compiler/GHC/Core/Coercion.hs-boot index 8354cf1ad4..8a10e09268 100644 --- a/compiler/GHC/Core/Coercion.hs-boot +++ b/compiler/GHC/Core/Coercion.hs-boot @@ -7,9 +7,9 @@ import GhcPrelude import {-# SOURCE #-} GHC.Core.TyCo.Rep import {-# SOURCE #-} GHC.Core.TyCon -import BasicTypes ( LeftOrRight ) +import GHC.Types.Basic ( LeftOrRight ) import GHC.Core.Coercion.Axiom -import Var +import GHC.Types.Var import Pair import Util diff --git a/compiler/GHC/Core/Coercion/Axiom.hs b/compiler/GHC/Core/Coercion/Axiom.hs index b2a66033ac..9b8fb6e067 100644 --- a/compiler/GHC/Core/Coercion/Axiom.hs +++ b/compiler/GHC/Core/Coercion/Axiom.hs @@ -36,15 +36,15 @@ import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import Outputable import FastString -import Name -import Unique -import Var +import GHC.Types.Name +import GHC.Types.Unique +import GHC.Types.Var import Util import Binary import Pair -import BasicTypes +import GHC.Types.Basic import Data.Typeable ( Typeable ) -import SrcLoc +import GHC.Types.SrcLoc import qualified Data.Data as Data import Data.Array import Data.List ( mapAccumL ) diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs index 685d3a278c..c5de884963 100644 --- a/compiler/GHC/Core/Coercion/Opt.hs +++ b/compiler/GHC/Core/Coercion/Opt.hs @@ -16,8 +16,8 @@ import GHC.Core.Type as Type hiding( substTyVarBndr, substTy ) import TcType ( exactTyCoVarsOfType ) import GHC.Core.TyCon import GHC.Core.Coercion.Axiom -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Outputable import GHC.Core.FamInstEnv ( flattenTys ) import Pair diff --git a/compiler/GHC/Core/ConLike.hs b/compiler/GHC/Core/ConLike.hs index 14e859acd6..0d538af40a 100644 --- a/compiler/GHC/Core/ConLike.hs +++ b/compiler/GHC/Core/ConLike.hs @@ -31,12 +31,12 @@ import GhcPrelude import GHC.Core.DataCon import GHC.Core.PatSyn import Outputable -import Unique +import GHC.Types.Unique import Util -import Name -import BasicTypes +import GHC.Types.Name +import GHC.Types.Basic import GHC.Core.TyCo.Rep (Type, ThetaType) -import Var +import GHC.Types.Var import GHC.Core.Type(mkTyConApp) import qualified Data.Data as Data @@ -69,7 +69,7 @@ eqConLike x y = getUnique x == getUnique y -- There used to be an Ord ConLike instance here that used Unique for ordering. -- It was intentionally removed to prevent determinism problems. --- See Note [Unique Determinism] in Unique. +-- See Note [Unique Determinism] in GHC.Types.Unique. instance Uniquable ConLike where getUnique (RealDataCon dc) = getUnique dc diff --git a/compiler/GHC/Core/ConLike.hs-boot b/compiler/GHC/Core/ConLike.hs-boot index 8b007a2e0d..0a6e732d88 100644 --- a/compiler/GHC/Core/ConLike.hs-boot +++ b/compiler/GHC/Core/ConLike.hs-boot @@ -1,7 +1,7 @@ module GHC.Core.ConLike where import {-# SOURCE #-} GHC.Core.DataCon (DataCon) import {-# SOURCE #-} GHC.Core.PatSyn (PatSyn) -import Name ( Name ) +import GHC.Types.Name ( Name ) data ConLike = RealDataCon DataCon | PatSynCon PatSyn diff --git a/compiler/GHC/Core/DataCon.hs b/compiler/GHC/Core/DataCon.hs index 5b3501b3a9..13470c93af 100644 --- a/compiler/GHC/Core/DataCon.hs +++ b/compiler/GHC/Core/DataCon.hs @@ -63,25 +63,25 @@ module GHC.Core.DataCon ( import GhcPrelude -import {-# SOURCE #-} MkId( DataConBoxer ) +import {-# SOURCE #-} GHC.Types.Id.Make ( DataConBoxer ) import GHC.Core.Type as Type import GHC.Core.Coercion import GHC.Core.Unify import GHC.Core.TyCon -import FieldLabel +import GHC.Types.FieldLabel import GHC.Core.Class -import Name +import GHC.Types.Name import PrelNames import GHC.Core.Predicate -import Var +import GHC.Types.Var import Outputable import Util -import BasicTypes +import GHC.Types.Basic import FastString -import Module +import GHC.Types.Module import Binary -import UniqSet -import Unique( mkAlphaTyVarUnique ) +import GHC.Types.Unique.Set +import GHC.Types.Unique( mkAlphaTyVarUnique ) import Data.ByteString (ByteString) import qualified Data.ByteString.Builder as BSB @@ -204,7 +204,7 @@ Note [Data constructor workers and wrappers] Note [The need for a wrapper] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Why might the wrapper have anything to do? The full story is -in wrapper_reqd in MkId.mkDataConRep. +in wrapper_reqd in GHC.Types.Id.Make.mkDataConRep. * Unboxing strict fields (with -funbox-strict-fields) data T = MkT !(Int,Int) @@ -614,7 +614,7 @@ data DataConRep -- and *including* all evidence args , dcr_stricts :: [StrictnessMark] -- 1-1 with dcr_arg_tys - -- See also Note [Data-con worker strictness] in MkId.hs + -- See also Note [Data-con worker strictness] in GHC.Types.Id.Make , dcr_bangs :: [HsImplBang] -- The actual decisions made (including failures) -- about the original arguments; 1-1 with orig_arg_tys @@ -634,7 +634,7 @@ data DataConRep -- emit a warning (in checkValidDataCon) and treat it like -- @(HsSrcBang _ NoSrcUnpack SrcLazy)@ data HsSrcBang = - HsSrcBang SourceText -- Note [Pragma source text] in BasicTypes + HsSrcBang SourceText -- Note [Pragma source text] in GHC.Types.Basic SrcUnpackedness SrcStrictness deriving Data.Data @@ -740,7 +740,7 @@ Terminology: * However, if T was defined in an imported module, the importing module must follow the decisions made in the original module, regardless of the flag settings in the importing module. - Also see Note [Bangs on imported data constructors] in MkId + Also see Note [Bangs on imported data constructors] in GHC.Types.Id.Make * The dcr_bangs field of the dcRep field records the [HsImplBang] If T was defined in this module, Without -O the dcr_bangs might be diff --git a/compiler/GHC/Core/DataCon.hs-boot b/compiler/GHC/Core/DataCon.hs-boot index 0d8957ea60..ab83a75117 100644 --- a/compiler/GHC/Core/DataCon.hs-boot +++ b/compiler/GHC/Core/DataCon.hs-boot @@ -1,13 +1,13 @@ module GHC.Core.DataCon where import GhcPrelude -import Var( TyVar, TyCoVar, TyVarBinder ) -import Name( Name, NamedThing ) +import GHC.Types.Var( TyVar, TyCoVar, TyVarBinder ) +import GHC.Types.Name( Name, NamedThing ) import {-# SOURCE #-} GHC.Core.TyCon( TyCon ) -import FieldLabel ( FieldLabel ) -import Unique ( Uniquable ) +import GHC.Types.FieldLabel ( FieldLabel ) +import GHC.Types.Unique ( Uniquable ) import Outputable ( Outputable, OutputableBndr ) -import BasicTypes (Arity) +import GHC.Types.Basic (Arity) import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, ThetaType ) data DataCon diff --git a/compiler/GHC/Core/FVs.hs b/compiler/GHC/Core/FVs.hs index 31c10045d6..67577bcd9b 100644 --- a/compiler/GHC/Core/FVs.hs +++ b/compiler/GHC/Core/FVs.hs @@ -62,14 +62,14 @@ module GHC.Core.FVs ( import GhcPrelude import GHC.Core -import Id -import IdInfo -import NameSet -import UniqSet -import Unique (Uniquable (..)) -import Name -import VarSet -import Var +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Name.Set +import GHC.Types.Unique.Set +import GHC.Types.Unique (Uniquable (..)) +import GHC.Types.Name +import GHC.Types.Var.Set +import GHC.Types.Var import GHC.Core.Type import GHC.Core.TyCo.Rep import GHC.Core.TyCo.FVs @@ -79,7 +79,7 @@ import GHC.Core.FamInstEnv import TysPrim( funTyConName ) import Maybes( orElse ) import Util -import BasicTypes( Activation ) +import GHC.Types.Basic( Activation ) import Outputable import FV diff --git a/compiler/GHC/Core/FamInstEnv.hs b/compiler/GHC/Core/FamInstEnv.hs index 1343544612..8ac78035bd 100644 --- a/compiler/GHC/Core/FamInstEnv.hs +++ b/compiler/GHC/Core/FamInstEnv.hs @@ -49,17 +49,17 @@ import GHC.Core.TyCo.Rep import GHC.Core.TyCon import GHC.Core.Coercion import GHC.Core.Coercion.Axiom -import VarSet -import VarEnv -import Name -import UniqDFM +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Name +import GHC.Types.Unique.DFM import Outputable import Maybes import GHC.Core.Map -import Unique +import GHC.Types.Unique import Util -import Var -import SrcLoc +import GHC.Types.Var +import GHC.Types.SrcLoc import FastString import Control.Monad import Data.List( mapAccumL ) diff --git a/compiler/GHC/Core/InstEnv.hs b/compiler/GHC/Core/InstEnv.hs index 51c1db1b25..7fcea8433e 100644 --- a/compiler/GHC/Core/InstEnv.hs +++ b/compiler/GHC/Core/InstEnv.hs @@ -36,19 +36,19 @@ import GhcPrelude import TcType -- InstEnv is really part of the type checker, -- and depends on TcType in many ways import GHC.Core ( IsOrphan(..), isOrphan, chooseOrphanAnchor ) -import Module +import GHC.Types.Module import GHC.Core.Class -import Var -import VarSet -import Name -import NameSet +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Core.Unify import Outputable import ErrUtils -import BasicTypes -import UniqDFM +import GHC.Types.Basic +import GHC.Types.Unique.DFM import Util -import Id +import GHC.Types.Id import Data.Data ( Data ) import Data.Maybe ( isJust, isNothing ) diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index 47a0a9cd2d..86c7ebdeea 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -31,22 +31,22 @@ import GHC.Core.Utils import GHC.Core.Stats ( coreBindsStats ) import GHC.Core.Op.Monad import Bag -import Literal +import GHC.Types.Literal import GHC.Core.DataCon import TysWiredIn import TysPrim import TcType ( isFloatingTy ) -import Var -import VarEnv -import VarSet -import UniqSet( nonDetEltsUniqSet ) -import Name -import Id -import IdInfo +import GHC.Types.Var as Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Unique.Set( nonDetEltsUniqSet ) +import GHC.Types.Name +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.Ppr import ErrUtils import GHC.Core.Coercion -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.Type as Type import GHC.Types.RepType import GHC.Core.TyCo.Rep -- checks validity of types/coercions @@ -55,7 +55,7 @@ import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Ppr ( pprTyVar ) import GHC.Core.TyCon as TyCon import GHC.Core.Coercion.Axiom -import BasicTypes +import GHC.Types.Basic import ErrUtils as Err import ListSetOps import PrelNames @@ -65,7 +65,7 @@ import Util import GHC.Core.InstEnv ( instanceDFunId ) import GHC.Core.Coercion.Opt ( checkAxInstCo ) import GHC.Core.Arity ( typeArity ) -import Demand ( splitStrictSig, isBotDiv ) +import GHC.Types.Demand ( splitStrictSig, isBotDiv ) import GHC.Driver.Types import GHC.Driver.Session diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs index d1fe1b0aa1..b3622a7644 100644 --- a/compiler/GHC/Core/Make.hs +++ b/compiler/GHC/Core/Make.hs @@ -56,31 +56,31 @@ module GHC.Core.Make ( import GhcPrelude -import Id -import Var ( EvVar, setTyVarUnique ) +import GHC.Types.Id +import GHC.Types.Var ( EvVar, setTyVarUnique ) import GHC.Core import GHC.Core.Utils ( exprType, needsCaseBinding, mkSingleAltCase, bindNonRec ) -import Literal +import GHC.Types.Literal import GHC.Driver.Types import GHC.Platform import TysWiredIn import PrelNames -import GHC.Hs.Utils ( mkChunkified, chunkify ) +import GHC.Hs.Utils ( mkChunkified, chunkify ) import GHC.Core.Type import GHC.Core.Coercion ( isCoVar ) import GHC.Core.DataCon ( DataCon, dataConWorkId ) import TysPrim -import IdInfo -import Demand -import Cpr -import Name hiding ( varName ) +import GHC.Types.Id.Info +import GHC.Types.Demand +import GHC.Types.Cpr +import GHC.Types.Name hiding ( varName ) import Outputable import FastString -import UniqSupply -import BasicTypes +import GHC.Types.Unique.Supply +import GHC.Types.Basic import Util import Data.List @@ -101,7 +101,7 @@ sortQuantVars :: [Var] -> [Var] -- and then other Ids -- It is a deterministic sort, meaining it doesn't look at the values of -- Uniques. For explanation why it's important See Note [Unique Determinism] --- in Unique. +-- in GHC.Types.Unique. sortQuantVars vs = sorted_tcvs ++ ids where (tcvs, ids) = partition (isTyVar <||> isCoVar) vs diff --git a/compiler/GHC/Core/Map.hs b/compiler/GHC/Core/Map.hs index c3e765ff2b..bb4eeb0fff 100644 --- a/compiler/GHC/Core/Map.hs +++ b/compiler/GHC/Core/Map.hs @@ -42,17 +42,17 @@ import GhcPrelude import TrieMap import GHC.Core import GHC.Core.Coercion -import Name +import GHC.Types.Name import GHC.Core.Type import GHC.Core.TyCo.Rep -import Var +import GHC.Types.Var import FastString(FastString) import Util import qualified Data.Map as Map import qualified Data.IntMap as IntMap -import VarEnv -import NameEnv +import GHC.Types.Var.Env +import GHC.Types.Name.Env import Outputable import Control.Monad( (>=>) ) diff --git a/compiler/GHC/Core/Op/CSE.hs b/compiler/GHC/Core/Op/CSE.hs index dc93dacf07..790e9b97d3 100644 --- a/compiler/GHC/Core/Op/CSE.hs +++ b/compiler/GHC/Core/Op/CSE.hs @@ -16,9 +16,9 @@ module GHC.Core.Op.CSE (cseProgram, cseOneExpr) where import GhcPrelude import GHC.Core.Subst -import Var ( Var ) -import VarEnv ( mkInScopeSet ) -import Id ( Id, idType, idHasRules +import GHC.Types.Var ( Var ) +import GHC.Types.Var.Env ( mkInScopeSet ) +import GHC.Types.Id ( Id, idType, idHasRules , idInlineActivation, setInlineActivation , zapIdOccInfo, zapIdUsageInfo, idInlinePragma , isJoinId, isJoinId_maybe ) @@ -29,7 +29,7 @@ import GHC.Core.FVs ( exprFreeVars ) import GHC.Core.Type ( tyConAppArgs ) import GHC.Core import Outputable -import BasicTypes +import GHC.Types.Basic import GHC.Core.Map import Util ( filterOut, equalLength, debugIsOn ) import Data.List ( mapAccumL ) diff --git a/compiler/GHC/Core/Op/CallArity.hs b/compiler/GHC/Core/Op/CallArity.hs index aaf3372071..2ad5f169d8 100644 --- a/compiler/GHC/Core/Op/CallArity.hs +++ b/compiler/GHC/Core/Op/CallArity.hs @@ -9,17 +9,17 @@ module GHC.Core.Op.CallArity import GhcPrelude -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Driver.Session ( DynFlags ) -import BasicTypes +import GHC.Types.Basic import GHC.Core -import Id +import GHC.Types.Id import GHC.Core.Arity ( typeArity ) import GHC.Core.Utils ( exprIsCheap, exprIsTrivial ) import UnVarGraph -import Demand +import GHC.Types.Demand import Util import Control.Arrow ( first, second ) diff --git a/compiler/GHC/Core/Op/ConstantFold.hs b/compiler/GHC/Core/Op/ConstantFold.hs index 126666a509..9b897f8efd 100644 --- a/compiler/GHC/Core/Op/ConstantFold.hs +++ b/compiler/GHC/Core/Op/ConstantFold.hs @@ -28,12 +28,12 @@ where import GhcPrelude -import {-# SOURCE #-} MkId ( mkPrimOpId, magicDictId ) +import {-# SOURCE #-} GHC.Types.Id.Make ( mkPrimOpId, magicDictId ) import GHC.Core import GHC.Core.Make -import Id -import Literal +import GHC.Types.Id +import GHC.Types.Literal import GHC.Core.SimpleOpt ( exprIsLiteral_maybe ) import PrimOp ( PrimOp(..), tagToEnumKey ) import TysWiredIn @@ -47,13 +47,13 @@ import GHC.Core.Utils ( cheapEqExpr, cheapEqExpr', exprIsHNF, exprType , stripTicksTop, stripTicksTopT, mkTicks ) import GHC.Core.Unfold ( exprIsConApp_maybe ) import GHC.Core.Type -import OccName ( occNameFS ) +import GHC.Types.Name.Occurrence ( occNameFS ) import PrelNames import Maybes ( orElse ) -import Name ( Name, nameOccName ) +import GHC.Types.Name ( Name, nameOccName ) import Outputable import FastString -import BasicTypes +import GHC.Types.Basic import GHC.Platform import Util import GHC.Core.Coercion (mkUnbranchedAxInstCo,mkSymCo,Role(..)) @@ -2123,7 +2123,7 @@ tx_lit_con platform adjust (LitAlt l) = Just $ LitAlt (mapLitValue platform adju tx_lit_con _ _ alt = pprPanic "caseRules" (ppr alt) -- NB: mapLitValue uses mkLitIntWrap etc, to ensure that the -- literal alternatives remain in Word/Int target ranges - -- (See Note [Word/Int underflow/overflow] in Literal and #13172). + -- (See Note [Word/Int underflow/overflow] in GHC.Types.Literal and #13172). adjustDyadicRight :: PrimOp -> Integer -> Maybe (Integer -> Integer) -- Given (x `op` lit) return a function 'f' s.t. f (x `op` lit) = x diff --git a/compiler/GHC/Core/Op/CprAnal.hs b/compiler/GHC/Core/Op/CprAnal.hs index c8f7e314e9..8016c2c13d 100644 --- a/compiler/GHC/Core/Op/CprAnal.hs +++ b/compiler/GHC/Core/Op/CprAnal.hs @@ -15,17 +15,17 @@ import GhcPrelude import GHC.Core.Op.WorkWrap.Lib ( deepSplitProductType_maybe ) import GHC.Driver.Session -import Demand -import Cpr +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core import GHC.Core.Seq import Outputable -import VarEnv -import BasicTypes +import GHC.Types.Var.Env +import GHC.Types.Basic import Data.List import GHC.Core.DataCon -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.Utils ( exprIsHNF, dumpIdInfoOfProgram ) import GHC.Core.TyCon import GHC.Core.Type diff --git a/compiler/GHC/Core/Op/DmdAnal.hs b/compiler/GHC/Core/Op/DmdAnal.hs index eb9f277f8a..88e96773ac 100644 --- a/compiler/GHC/Core/Op/DmdAnal.hs +++ b/compiler/GHC/Core/Op/DmdAnal.hs @@ -17,16 +17,16 @@ import GhcPrelude import GHC.Driver.Session import GHC.Core.Op.WorkWrap.Lib ( findTypeShape ) -import Demand -- All of it +import GHC.Types.Demand -- All of it import GHC.Core import GHC.Core.Seq ( seqBinds ) import Outputable -import VarEnv -import BasicTypes +import GHC.Types.Var.Env +import GHC.Types.Basic import Data.List ( mapAccumL ) import GHC.Core.DataCon -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.Utils import GHC.Core.TyCon import GHC.Core.Type @@ -37,7 +37,7 @@ import Maybes ( isJust ) import TysWiredIn import TysPrim ( realWorldStatePrimTy ) import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) -import UniqSet +import GHC.Types.Unique.Set {- ************************************************************************ @@ -136,7 +136,7 @@ dmdAnalStar env dmd e , (dmd_ty, e') <- dmdAnal env cd e = ASSERT2( not (isUnliftedType (exprType e)) || exprOkForSpeculation e, ppr e ) -- The argument 'e' should satisfy the let/app invariant - -- See Note [Analysing with absent demand] in Demand.hs + -- See Note [Analysing with absent demand] in GHC.Types.Demand (postProcessDmdType dmd_shell dmd_ty, e') -- Main Demand Analsysis machinery @@ -389,7 +389,7 @@ Note [Demand on the scrutinee of a product case] When figuring out the demand on the scrutinee of a product case, we use the demands of the case alternative, i.e. id_dmds. But note that these include the demand on the case binder; -see Note [Demand on case-alternative binders] in Demand.hs. +see Note [Demand on case-alternative binders] in GHC.Types.Demand. This is crucial. Example: f x = case x of y { (a,b) -> k y a } If we just take scrut_demand = U(L,A), then we won't pass x to the @@ -730,7 +730,7 @@ trivial RHS (see Note [Demand analysis for trivial right-hand sides]). Because idArity of a function varies independently of its cardinality properties (cf. Note [idArity varies independently of dmdTypeDepth]), we implicitly encode the arity for when a demand signature is sound to unleash in its 'dmdTypeDepth' -(cf. Note [Understanding DmdType and StrictSig] in Demand). It is unsound to +(cf. Note [Understanding DmdType and StrictSig] in GHC.Types.Demand). It is unsound to unleash a demand signature when the incoming number of arguments is less than that. See Note [What are demand signatures?] for more details on soundness. @@ -777,7 +777,7 @@ reset or decrease arity. That's an unnecessary dependency, because * idArity is analysis information itself, thus volatile * We already *have* dmdTypeDepth, wo why not just use it to encode the threshold for when to unleash the signature - (cf. Note [Understanding DmdType and StrictSig] in Demand) + (cf. Note [Understanding DmdType and StrictSig] in GHC.Types.Demand) Consider the following expression, for example: @@ -1167,7 +1167,7 @@ findBndrsDmds env dmd_ty bndrs | otherwise = go dmd_ty bs findBndrDmd :: AnalEnv -> Bool -> DmdType -> Id -> (DmdType, Demand) --- See Note [Trimming a demand to a type] in Demand.hs +-- See Note [Trimming a demand to a type] in GHC.Types.Demand findBndrDmd env arg_of_dfun dmd_ty id = (dmd_ty', dmd') where diff --git a/compiler/GHC/Core/Op/Exitify.hs b/compiler/GHC/Core/Op/Exitify.hs index 45f9451787..bc6bca21e9 100644 --- a/compiler/GHC/Core/Op/Exitify.hs +++ b/compiler/GHC/Core/Op/Exitify.hs @@ -36,15 +36,15 @@ Now `t` is no longer in a recursive function, and good things happen! -} import GhcPrelude -import Var -import Id -import IdInfo +import GHC.Types.Var +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core import GHC.Core.Utils import State -import Unique -import VarSet -import VarEnv +import GHC.Types.Unique +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Core.FVs import FastString import GHC.Core.Type diff --git a/compiler/GHC/Core/Op/FloatIn.hs b/compiler/GHC/Core/Op/FloatIn.hs index 454ce39dfb..381dd0ddba 100644 --- a/compiler/GHC/Core/Op/FloatIn.hs +++ b/compiler/GHC/Core/Op/FloatIn.hs @@ -28,16 +28,16 @@ import GHC.Core.Make hiding ( wrapFloats ) import GHC.Driver.Types ( ModGuts(..) ) import GHC.Core.Utils import GHC.Core.FVs -import GHC.Core.Op.Monad ( CoreM ) -import Id ( isOneShotBndr, idType, isJoinId, isJoinId_maybe ) -import Var +import GHC.Core.Op.Monad ( CoreM ) +import GHC.Types.Id ( isOneShotBndr, idType, isJoinId, isJoinId_maybe ) +import GHC.Types.Var import GHC.Core.Type -import VarSet +import GHC.Types.Var.Set import Util import GHC.Driver.Session import Outputable -- import Data.List ( mapAccumL ) -import BasicTypes ( RecFlag(..), isRec ) +import GHC.Types.Basic ( RecFlag(..), isRec ) {- Top-level interface function, @floatInwards@. Note that we do not diff --git a/compiler/GHC/Core/Op/FloatOut.hs b/compiler/GHC/Core/Op/FloatOut.hs index fb47b2b3ed..f4a9649f98 100644 --- a/compiler/GHC/Core/Op/FloatOut.hs +++ b/compiler/GHC/Core/Op/FloatOut.hs @@ -19,11 +19,11 @@ import GHC.Core.Arity ( etaExpand ) import GHC.Core.Op.Monad ( FloatOutSwitches(..) ) import GHC.Driver.Session -import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) -import Id ( Id, idArity, idType, isBottomingId, - isJoinId, isJoinId_maybe ) +import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) +import GHC.Types.Id ( Id, idArity, idType, isBottomingId, + isJoinId, isJoinId_maybe ) import GHC.Core.Op.SetLevels -import UniqSupply ( UniqSupply ) +import GHC.Types.Unique.Supply ( UniqSupply ) import Bag import Util import Maybes diff --git a/compiler/GHC/Core/Op/LiberateCase.hs b/compiler/GHC/Core/Op/LiberateCase.hs index 399abf4c67..e753815736 100644 --- a/compiler/GHC/Core/Op/LiberateCase.hs +++ b/compiler/GHC/Core/Op/LiberateCase.hs @@ -15,8 +15,8 @@ import GHC.Driver.Session import GHC.Core import GHC.Core.Unfold ( couldBeSmallEnoughToInline ) import TysWiredIn ( unitDataConId ) -import Id -import VarEnv +import GHC.Types.Id +import GHC.Types.Var.Env import Util ( notNull ) {- diff --git a/compiler/GHC/Core/Op/Monad.hs b/compiler/GHC/Core/Op/Monad.hs index a0a15bba6f..a2c12d638f 100644 --- a/compiler/GHC/Core/Op/Monad.hs +++ b/compiler/GHC/Core/Op/Monad.hs @@ -52,21 +52,21 @@ import GhcPrelude hiding ( read ) import GHC.Core import GHC.Driver.Types -import Module +import GHC.Types.Module import GHC.Driver.Session -import BasicTypes ( CompilerPhase(..) ) -import Annotations +import GHC.Types.Basic ( CompilerPhase(..) ) +import GHC.Types.Annotations import IOEnv hiding ( liftIO, failM, failWithM ) import qualified IOEnv ( liftIO ) -import Var +import GHC.Types.Var import Outputable import FastString import ErrUtils( Severity(..), DumpFormat (..), dumpOptionsFromFlag ) -import UniqSupply +import GHC.Types.Unique.Supply import MonadUtils -import NameEnv -import SrcLoc +import GHC.Types.Name.Env +import GHC.Types.SrcLoc import Data.Bifunctor ( bimap ) import ErrUtils (dumpAction) import Data.List (intersperse, groupBy, sortBy) diff --git a/compiler/GHC/Core/Op/OccurAnal.hs b/compiler/GHC/Core/Op/OccurAnal.hs index b676be38ae..ac1c665e1e 100644 --- a/compiler/GHC/Core/Op/OccurAnal.hs +++ b/compiler/GHC/Core/Op/OccurAnal.hs @@ -28,24 +28,24 @@ import GHC.Core.FVs import GHC.Core.Utils ( exprIsTrivial, isDefaultAlt, isExpandableApp, stripTicksTopE, mkTicks ) import GHC.Core.Arity ( joinRhsArity ) -import Id -import IdInfo -import Name( localiseName ) -import BasicTypes -import Module( Module ) +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Name( localiseName ) +import GHC.Types.Basic +import GHC.Types.Module( Module ) import GHC.Core.Coercion import GHC.Core.Type -import VarSet -import VarEnv -import Var -import Demand ( argOneShots, argsOneShots ) +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Var +import GHC.Types.Demand ( argOneShots, argsOneShots ) import Digraph ( SCC(..), Node(..) , stronglyConnCompFromEdgedVerticesUniq , stronglyConnCompFromEdgedVerticesUniqR ) -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Util import Outputable import Data.List @@ -1870,7 +1870,7 @@ occAnalApp env (Var fun, args, ticks) n_args = length args fun_uds = mkOneOcc env fun (if n_val_args > 0 then IsInteresting else NotInteresting) n_args is_exp = isExpandableApp fun n_val_args - -- See Note [CONLIKE pragma] in BasicTypes + -- See Note [CONLIKE pragma] in GHC.Types.Basic -- The definition of is_exp should match that in GHC.Core.Op.Simplify.prepareRhs one_shots = argsOneShots (idStrictness fun) guaranteed_val_args diff --git a/compiler/GHC/Core/Op/SetLevels.hs b/compiler/GHC/Core/Op/SetLevels.hs index a3b1fd75b3..0ac49a0c1c 100644 --- a/compiler/GHC/Core/Op/SetLevels.hs +++ b/compiler/GHC/Core/Op/SetLevels.hs @@ -79,28 +79,28 @@ import GHC.Core.FVs -- all of it import GHC.Core.Subst import GHC.Core.Make ( sortQuantVars ) -import Id -import IdInfo -import Var -import VarSet -import UniqSet ( nonDetFoldUniqSet ) -import UniqDSet ( getUniqDSet ) -import VarEnv -import Literal ( litIsTrivial ) -import Demand ( StrictSig, Demand, isStrictDmd, splitStrictSig, increaseStrictSigArity ) -import Cpr ( mkCprSig, botCpr ) -import Name ( getOccName, mkSystemVarName ) -import OccName ( occNameString ) +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Unique.Set ( nonDetFoldUniqSet ) +import GHC.Types.Unique.DSet ( getUniqDSet ) +import GHC.Types.Var.Env +import GHC.Types.Literal ( litIsTrivial ) +import GHC.Types.Demand ( StrictSig, Demand, isStrictDmd, splitStrictSig, increaseStrictSigArity ) +import GHC.Types.Cpr ( mkCprSig, botCpr ) +import GHC.Types.Name ( getOccName, mkSystemVarName ) +import GHC.Types.Name.Occurrence ( occNameString ) import GHC.Core.Type ( Type, mkLamTypes, splitTyConApp_maybe, tyCoVarsOfType , mightBeUnliftedType, closeOverKindsDSet ) -import BasicTypes ( Arity, RecFlag(..), isRec ) +import GHC.Types.Basic ( Arity, RecFlag(..), isRec ) import GHC.Core.DataCon ( dataConOrigResTy ) import TysWiredIn -import UniqSupply +import GHC.Types.Unique.Supply import Util import Outputable import FastString -import UniqDFM +import GHC.Types.Unique.DFM import FV import Data.Maybe import MonadUtils ( mapAccumLM ) @@ -1352,7 +1352,7 @@ lvlLamBndrs env lvl bndrs is_major bndr = isId bndr && not (isProbablyOneShotLambda bndr) -- The "probably" part says "don't float things out of a -- probable one-shot lambda" - -- See Note [Computing one-shot info] in Demand.hs + -- See Note [Computing one-shot info] in GHC.Types.Demand lvlJoinBndrs :: LevelEnv -> Level -> RecFlag -> [OutVar] -> (LevelEnv, [LevelledBndr]) @@ -1619,7 +1619,7 @@ abstractVars :: Level -> LevelEnv -> DVarSet -> [OutVar] -- abstracted in deterministic order, not dependent on the values of -- Uniques. This is achieved by using DVarSets, deterministic free -- variable computation and deterministic sort. - -- See Note [Unique Determinism] in Unique for explanation of why + -- See Note [Unique Determinism] in GHC.Types.Unique for explanation of why -- Uniques are not deterministic. abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs = -- NB: sortQuantVars might not put duplicates next to each other @@ -1667,7 +1667,7 @@ newPolyBndrs dest_lvl add_subst env (v, v') = extendIdSubst env v (mkVarApps (Var v') abs_vars) add_id env (v, v') = extendVarEnv env v ((v':abs_vars), mkVarApps (Var v') abs_vars) - mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $ -- Note [transferPolyIdInfo] in Id.hs + mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $ -- Note [transferPolyIdInfo] in GHC.Types.Id transfer_join_info bndr $ mkSysLocal (mkFastString str) uniq poly_ty where diff --git a/compiler/GHC/Core/Op/Simplify.hs b/compiler/GHC/Core/Op/Simplify.hs index 760beeddb2..5d7d91a37f 100644 --- a/compiler/GHC/Core/Op/Simplify.hs +++ b/compiler/GHC/Core/Op/Simplify.hs @@ -21,13 +21,13 @@ import GHC.Core.Op.Simplify.Env import GHC.Core.Op.Simplify.Utils import GHC.Core.Op.OccurAnal ( occurAnalyseExpr ) import GHC.Core.FamInstEnv ( FamInstEnv ) -import Literal ( litIsLifted ) --, mkLitInt ) -- temporalily commented out. See #8326 -import Id -import MkId ( seqId ) -import GHC.Core.Make ( FloatBind, mkImpossibleExpr, castBottomExpr ) +import GHC.Types.Literal ( litIsLifted ) --, mkLitInt ) -- temporalily commented out. See #8326 +import GHC.Types.Id +import GHC.Types.Id.Make ( seqId ) +import GHC.Core.Make ( FloatBind, mkImpossibleExpr, castBottomExpr ) import qualified GHC.Core.Make -import IdInfo -import Name ( mkSystemVarName, isExternalName, getOccFS ) +import GHC.Types.Id.Info +import GHC.Types.Name ( mkSystemVarName, isExternalName, getOccFS ) import GHC.Core.Coercion hiding ( substCo, substCoVar ) import GHC.Core.Coercion.Opt ( optCoercion ) import GHC.Core.FamInstEnv ( topNormaliseType_maybe ) @@ -37,27 +37,27 @@ import GHC.Core.DataCon , StrictnessMark (..) ) import GHC.Core.Op.Monad ( Tick(..), SimplMode(..) ) import GHC.Core -import Demand ( StrictSig(..), dmdTypeDepth, isStrictDmd +import GHC.Types.Demand ( StrictSig(..), dmdTypeDepth, isStrictDmd , mkClosedStrictSig, topDmd, botDiv ) -import Cpr ( mkCprSig, botCpr ) +import GHC.Types.Cpr ( mkCprSig, botCpr ) import GHC.Core.Ppr ( pprCoreExpr ) import GHC.Core.Unfold import GHC.Core.Utils import GHC.Core.SimpleOpt ( pushCoTyArg, pushCoValArg , joinPointBinding_maybe, joinPointBindings_maybe ) import GHC.Core.Rules ( mkRuleInfo, lookupRule, getRules ) -import BasicTypes ( TopLevelFlag(..), isNotTopLevel, isTopLevel, +import GHC.Types.Basic ( TopLevelFlag(..), isNotTopLevel, isTopLevel, RecFlag(..), Arity ) import MonadUtils ( mapAccumLM, liftIO ) -import Var ( isTyCoVar ) +import GHC.Types.Var ( isTyCoVar ) import Maybes ( orElse ) import Control.Monad import Outputable import FastString import Util import ErrUtils -import Module ( moduleName, pprModuleName ) -import PrimOp ( PrimOp (SeqOp) ) +import GHC.Types.Module ( moduleName, pprModuleName ) +import PrimOp ( PrimOp (SeqOp) ) {- @@ -474,7 +474,7 @@ prepareRhs mode top_lvl occ _ rhs0 = return (is_exp, emptyLetFloats, Var fun) where is_exp = isExpandableApp fun n_val_args -- The fun a constructor or PAP - -- See Note [CONLIKE pragma] in BasicTypes + -- See Note [CONLIKE pragma] in GHC.Types.Basic -- The definition of is_exp should match that in -- OccurAnal.occAnalApp @@ -2139,7 +2139,7 @@ If you find a match, rewrite it, and apply to 'rhs'. Notice that we can simply drop casts on the fly here, which makes it more likely that a rule will match. -See Note [User-defined RULES for seq] in MkId. +See Note [User-defined RULES for seq] in GHC.Types.Id.Make. Note [Occurrence-analyse after rule firing] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2533,7 +2533,7 @@ rebuildCase env scrut case_bndr alts@[(_, bndrs, rhs)] cont -- 2c. Try the seq rules if -- a) it binds only the case binder -- b) a rule for seq applies - -- See Note [User-defined RULES for seq] in MkId + -- See Note [User-defined RULES for seq] in GHC.Types.Id.Make | is_plain_seq = do { mb_rule <- trySeqRules env scrut rhs cont ; case mb_rule of @@ -2757,7 +2757,7 @@ a case pattern. This is *important*. Consider We really must record that b is already evaluated so that we don't go and re-evaluate it when constructing the result. -See Note [Data-con worker strictness] in MkId.hs +See Note [Data-con worker strictness] in GHC.Types.Id.Make NB: simplLamBndrs preserves this eval info diff --git a/compiler/GHC/Core/Op/Simplify/Driver.hs b/compiler/GHC/Core/Op/Simplify/Driver.hs index b6ec392599..1b7bb0d1e3 100644 --- a/compiler/GHC/Core/Op/Simplify/Driver.hs +++ b/compiler/GHC/Core/Op/Simplify/Driver.hs @@ -21,7 +21,7 @@ import GHC.Core.Rules ( mkRuleBase, unionRuleBase, getRules ) import GHC.Core.Ppr ( pprCoreBindings, pprCoreExpr ) import GHC.Core.Op.OccurAnal ( occurAnalysePgm, occurAnalyseExpr ) -import IdInfo +import GHC.Types.Id.Info import GHC.Core.Stats ( coreBindsSize, coreBindsStats, exprSize ) import GHC.Core.Utils ( mkTicks, stripTicksTop ) import GHC.Core.Lint ( endPass, lintPassResult, dumpPassResult, @@ -35,11 +35,11 @@ import qualified ErrUtils as Err import GHC.Core.Op.FloatIn ( floatInwards ) import GHC.Core.Op.FloatOut ( floatOutwards ) import GHC.Core.FamInstEnv -import Id +import GHC.Types.Id import ErrUtils ( withTiming, withTimingD, DumpFormat (..) ) -import BasicTypes ( CompilerPhase(..), isDefaultInlinePragma, defaultInlinePragma ) -import VarSet -import VarEnv +import GHC.Types.Basic ( CompilerPhase(..), isDefaultInlinePragma, defaultInlinePragma ) +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Core.Op.LiberateCase ( liberateCase ) import GHC.Core.Op.StaticArgs ( doStaticArgs ) import GHC.Core.Op.Specialise ( specProgram) @@ -49,14 +49,14 @@ import GHC.Core.Op.CprAnal ( cprAnalProgram ) import GHC.Core.Op.CallArity ( callArityAnalProgram ) import GHC.Core.Op.Exitify ( exitifyProgram ) import GHC.Core.Op.WorkWrap ( wwTopBinds ) -import SrcLoc +import GHC.Types.SrcLoc import Util -import Module +import GHC.Types.Module import GHC.Driver.Plugins ( withPlugins, installCoreToDos ) import GHC.Runtime.Loader -- ( initializePlugins ) -import UniqSupply ( UniqSupply, mkSplitUniqSupply, splitUniqSupply ) -import UniqFM +import GHC.Types.Unique.Supply ( UniqSupply, mkSplitUniqSupply, splitUniqSupply ) +import GHC.Types.Unique.FM import Outputable import Control.Monad import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/GHC/Core/Op/Simplify/Env.hs b/compiler/GHC/Core/Op/Simplify/Env.hs index 0e94f734af..47b95da59e 100644 --- a/compiler/GHC/Core/Op/Simplify/Env.hs +++ b/compiler/GHC/Core/Op/Simplify/Env.hs @@ -51,11 +51,11 @@ import GHC.Core.Op.Simplify.Monad import GHC.Core.Op.Monad ( SimplMode(..) ) import GHC.Core import GHC.Core.Utils -import Var -import VarEnv -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set import OrdList -import Id +import GHC.Types.Id as Id import GHC.Core.Make ( mkWildValBinder ) import GHC.Driver.Session ( DynFlags ) import TysWiredIn @@ -63,11 +63,11 @@ import qualified GHC.Core.Type as Type import GHC.Core.Type hiding ( substTy, substTyVar, substTyVarBndr, extendTvSubst, extendCvSubst ) import qualified GHC.Core.Coercion as Coercion import GHC.Core.Coercion hiding ( substCo, substCoVar, substCoVarBndr ) -import BasicTypes +import GHC.Types.Basic import MonadUtils import Outputable import Util -import UniqFM ( pprUniqFM ) +import GHC.Types.Unique.FM ( pprUniqFM ) import Data.List (mapAccumL) diff --git a/compiler/GHC/Core/Op/Simplify/Monad.hs b/compiler/GHC/Core/Op/Simplify/Monad.hs index e6b23734c4..d45dd13510 100644 --- a/compiler/GHC/Core/Op/Simplify/Monad.hs +++ b/compiler/GHC/Core/Op/Simplify/Monad.hs @@ -22,14 +22,14 @@ module GHC.Core.Op.Simplify.Monad ( import GhcPrelude -import Var ( Var, isId, mkLocalVar ) -import Name ( mkSystemVarName ) -import Id ( Id, mkSysLocalOrCoVar ) -import IdInfo ( IdDetails(..), vanillaIdInfo, setArityInfo ) +import GHC.Types.Var ( Var, isId, mkLocalVar ) +import GHC.Types.Name ( mkSystemVarName ) +import GHC.Types.Id ( Id, mkSysLocalOrCoVar ) +import GHC.Types.Id.Info ( IdDetails(..), vanillaIdInfo, setArityInfo ) import GHC.Core.Type ( Type, mkLamTypes ) import GHC.Core.FamInstEnv ( FamInstEnv ) import GHC.Core ( RuleEnv(..) ) -import UniqSupply +import GHC.Types.Unique.Supply import GHC.Driver.Session import GHC.Core.Op.Monad import Outputable @@ -38,7 +38,7 @@ import MonadUtils import ErrUtils as Err import Util ( count ) import Panic (throwGhcExceptionIO, GhcException (..)) -import BasicTypes ( IntWithInf, treatZeroAsInf, mkIntWithInf ) +import GHC.Types.Basic ( IntWithInf, treatZeroAsInf, mkIntWithInf ) import Control.Monad ( ap ) {- diff --git a/compiler/GHC/Core/Op/Simplify/Utils.hs b/compiler/GHC/Core/Op/Simplify/Utils.hs index 5fb9ddcee4..4b85bff280 100644 --- a/compiler/GHC/Core/Op/Simplify/Utils.hs +++ b/compiler/GHC/Core/Op/Simplify/Utils.hs @@ -51,17 +51,17 @@ import GHC.Core.FVs import GHC.Core.Utils import GHC.Core.Arity import GHC.Core.Unfold -import Name -import Id -import IdInfo -import Var -import Demand +import GHC.Types.Name +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Var +import GHC.Types.Demand import GHC.Core.Op.Simplify.Monad import GHC.Core.Type hiding( substTy ) import GHC.Core.Coercion hiding( substCo ) import GHC.Core.DataCon ( dataConWorkId, isNullaryRepDataCon ) -import VarSet -import BasicTypes +import GHC.Types.Var.Set +import GHC.Types.Basic import Util import OrdList ( isNilOL ) import MonadUtils @@ -1801,9 +1801,9 @@ abstractFloats dflags top_lvl main_tvs floats body mk_poly1 :: [TyVar] -> Id -> SimplM (Id, CoreExpr) mk_poly1 tvs_here var = do { uniq <- getUniqueM - ; let poly_name = setNameUnique (idName var) uniq -- Keep same name + ; let poly_name = setNameUnique (idName var) uniq -- Keep same name poly_ty = mkInvForAllTys tvs_here (idType var) -- But new type of course - poly_id = transferPolyIdInfo var tvs_here $ -- Note [transferPolyIdInfo] in Id.hs + poly_id = transferPolyIdInfo var tvs_here $ -- Note [transferPolyIdInfo] in GHC.Types.Id mkLocalId poly_name poly_ty ; return (poly_id, mkTyApps (Var poly_id) (mkTyVarTys tvs_here)) } -- In the olden days, it was crucial to copy the occInfo of the original var, diff --git a/compiler/GHC/Core/Op/SpecConstr.hs b/compiler/GHC/Core/Op/SpecConstr.hs index 4522e2d23c..0a72edce8d 100644 --- a/compiler/GHC/Core/Op/SpecConstr.hs +++ b/compiler/GHC/Core/Op/SpecConstr.hs @@ -29,7 +29,7 @@ import GHC.Core.Utils import GHC.Core.Unfold ( couldBeSmallEnoughToInline ) import GHC.Core.FVs ( exprsFreeVarsList ) import GHC.Core.Op.Monad -import Literal ( litIsLifted ) +import GHC.Types.Literal ( litIsLifted ) import GHC.Driver.Types ( ModGuts(..) ) import GHC.Core.Op.WorkWrap.Lib ( isWorkerSmallEnough, mkWorkerArgs ) import GHC.Core.DataCon @@ -37,30 +37,30 @@ import GHC.Core.Coercion hiding( substCo ) import GHC.Core.Rules import GHC.Core.Type hiding ( substTy ) import GHC.Core.TyCon ( tyConName ) -import Id +import GHC.Types.Id import GHC.Core.Ppr ( pprParendExpr ) import GHC.Core.Make ( mkImpossibleExpr ) -import VarEnv -import VarSet -import Name -import BasicTypes +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Name +import GHC.Types.Basic import GHC.Driver.Session ( DynFlags(..), GeneralFlag( Opt_SpecConstrKeen ) , gopt, hasPprDebug ) import Maybes ( orElse, catMaybes, isJust, isNothing ) -import Demand -import Cpr +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Serialized ( deserializeWithData ) import Util import Pair -import UniqSupply +import GHC.Types.Unique.Supply import Outputable import FastString -import UniqFM +import GHC.Types.Unique.FM import MonadUtils import Control.Monad ( zipWithM ) import Data.List import PrelNames ( specTyConName ) -import Module +import GHC.Types.Module import GHC.Core.TyCon ( TyCon ) import GHC.Exts( SpecConstrAnnotation(..) ) import Data.Ord( comparing ) @@ -2084,7 +2084,7 @@ callToPats env bndr_occs call@(Call _ args con_env) -- lambdas with different argument orders. See -- determinism/simplCore/should_compile/spec-inline-determ.hs -- for an example. For explanation of determinism - -- considerations See Note [Unique Determinism] in Unique. + -- considerations See Note [Unique Determinism] in GHC.Types.Unique. in_scope_vars = getInScopeVars in_scope is_in_scope v = v `elemVarSet` in_scope_vars diff --git a/compiler/GHC/Core/Op/Specialise.hs b/compiler/GHC/Core/Op/Specialise.hs index 250a0f7313..b43bc90ef1 100644 --- a/compiler/GHC/Core/Op/Specialise.hs +++ b/compiler/GHC/Core/Op/Specialise.hs @@ -15,30 +15,30 @@ module GHC.Core.Op.Specialise ( specProgram, specUnfolding ) where import GhcPrelude -import Id +import GHC.Types.Id import TcType hiding( substTy ) import GHC.Core.Type hiding( substTy, extendTvSubstList ) import GHC.Core.Predicate -import Module( Module, HasModule(..) ) +import GHC.Types.Module( Module, HasModule(..) ) import GHC.Core.Coercion( Coercion ) import GHC.Core.Op.Monad import qualified GHC.Core.Subst import GHC.Core.Unfold -import Var ( isLocalVar ) -import VarSet -import VarEnv +import GHC.Types.Var ( isLocalVar ) +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Core import GHC.Core.Rules import GHC.Core.SimpleOpt ( collectBindersPushingCo ) import GHC.Core.Utils ( exprIsTrivial, mkCast, exprType ) import GHC.Core.FVs import GHC.Core.Arity ( etaExpandToJoinPointRule ) -import UniqSupply -import Name -import MkId ( voidArgId, voidPrimId ) +import GHC.Types.Unique.Supply +import GHC.Types.Name +import GHC.Types.Id.Make ( voidArgId, voidPrimId ) import Maybes ( mapMaybe, isJust ) import MonadUtils ( foldlM ) -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Types import Bag import GHC.Driver.Session @@ -46,7 +46,7 @@ import Util import Outputable import FastString import State -import UniqDFM +import GHC.Types.Unique.DFM import GHC.Core.TyCo.Rep (TyCoBinder (..)) import Control.Monad @@ -2129,7 +2129,7 @@ emptyUDs = MkUD { ud_binds = emptyBag, ud_calls = emptyDVarEnv } type CallDetails = DIdEnv CallInfoSet -- The order of specialized binds and rules depends on how we linearize -- CallDetails, so to get determinism we must use a deterministic set here. - -- See Note [Deterministic UniqFM] in UniqDFM + -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM data CallInfoSet = CIS Id (Bag CallInfo) -- The list of types and dictionaries is guaranteed to diff --git a/compiler/GHC/Core/Op/StaticArgs.hs b/compiler/GHC/Core/Op/StaticArgs.hs index e550fabfd9..835f1ffbaa 100644 --- a/compiler/GHC/Core/Op/StaticArgs.hs +++ b/compiler/GHC/Core/Op/StaticArgs.hs @@ -53,20 +53,20 @@ module GHC.Core.Op.StaticArgs ( doStaticArgs ) where import GhcPrelude -import Var +import GHC.Types.Var import GHC.Core import GHC.Core.Utils import GHC.Core.Type import GHC.Core.Coercion -import Id -import Name -import VarEnv -import UniqSupply +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Var.Env +import GHC.Types.Unique.Supply import Util -import UniqFM -import VarSet -import Unique -import UniqSet +import GHC.Types.Unique.FM +import GHC.Types.Var.Set +import GHC.Types.Unique +import GHC.Types.Unique.Set import Outputable import Data.List (mapAccumL) diff --git a/compiler/GHC/Core/Op/Tidy.hs b/compiler/GHC/Core/Op/Tidy.hs index 758c1daf6c..4759efa0e9 100644 --- a/compiler/GHC/Core/Op/Tidy.hs +++ b/compiler/GHC/Core/Op/Tidy.hs @@ -19,16 +19,16 @@ import GhcPrelude import GHC.Core import GHC.Core.Seq ( seqUnfolding ) -import Id -import IdInfo -import Demand ( zapUsageEnvSig ) +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Demand ( zapUsageEnvSig ) import GHC.Core.Type ( tidyType, tidyVarBndr ) import GHC.Core.Coercion ( tidyCo ) -import Var -import VarEnv -import UniqFM -import Name hiding (tidyNameOcc) -import SrcLoc +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Unique.FM +import GHC.Types.Name hiding (tidyNameOcc) +import GHC.Types.SrcLoc import Maybes import Data.List @@ -277,7 +277,7 @@ We keep the OneShotInfo because we want it to propagate into the interface. Not all OneShotInfo is determined by a compiler analysis; some is added by a call of GHC.Exts.oneShot, which is then discarded before the end of the optimisation pipeline, leaving only the OneShotInfo on the lambda. Hence we -must preserve this info in inlinings. See Note [The oneShot function] in MkId. +must preserve this info in inlinings. See Note [The oneShot function] in GHC.Types.Id.Make. This applies to lambda binders only, hence it is stored in IfaceLamBndr. -} diff --git a/compiler/GHC/Core/Op/WorkWrap.hs b/compiler/GHC/Core/Op/WorkWrap.hs index 241a295899..6abfb4733c 100644 --- a/compiler/GHC/Core/Op/WorkWrap.hs +++ b/compiler/GHC/Core/Op/WorkWrap.hs @@ -14,15 +14,15 @@ import GHC.Core import GHC.Core.Unfold ( certainlyWillInline, mkWwInlineRule, mkWorkerUnfolding ) import GHC.Core.Utils ( exprType, exprIsHNF ) import GHC.Core.FVs ( exprFreeVars ) -import Var -import Id -import IdInfo +import GHC.Types.Var +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.Type -import UniqSupply -import BasicTypes +import GHC.Types.Unique.Supply +import GHC.Types.Basic import GHC.Driver.Session -import Demand -import Cpr +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core.Op.WorkWrap.Lib import Util import Outputable diff --git a/compiler/GHC/Core/Op/WorkWrap/Lib.hs b/compiler/GHC/Core/Op/WorkWrap/Lib.hs index 3ce454e7a2..6245bb9099 100644 --- a/compiler/GHC/Core/Op/WorkWrap/Lib.hs +++ b/compiler/GHC/Core/Op/WorkWrap/Lib.hs @@ -19,28 +19,28 @@ import GhcPrelude import GHC.Core import GHC.Core.Utils ( exprType, mkCast, mkDefaultCase, mkSingleAltCase ) -import Id -import IdInfo ( JoinArity ) +import GHC.Types.Id +import GHC.Types.Id.Info ( JoinArity ) import GHC.Core.DataCon -import Demand -import Cpr +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core.Make ( mkAbsentErrorApp, mkCoreUbxTup , mkCoreApp, mkCoreLet ) -import MkId ( voidArgId, voidPrimId ) +import GHC.Types.Id.Make ( voidArgId, voidPrimId ) import TysWiredIn ( tupleDataCon ) import TysPrim ( voidPrimTy ) -import Literal ( absentLiteralOf, rubbishLit ) -import VarEnv ( mkInScopeSet ) -import VarSet ( VarSet ) +import GHC.Types.Literal ( absentLiteralOf, rubbishLit ) +import GHC.Types.Var.Env ( mkInScopeSet ) +import GHC.Types.Var.Set ( VarSet ) import GHC.Core.Type import GHC.Core.Predicate ( isClassPred ) import GHC.Types.RepType ( isVoidTy, typePrimRep ) import GHC.Core.Coercion import GHC.Core.FamInstEnv -import BasicTypes ( Boxity(..) ) +import GHC.Types.Basic ( Boxity(..) ) import GHC.Core.TyCon -import UniqSupply -import Unique +import GHC.Types.Unique.Supply +import GHC.Types.Unique import Maybes import Util import Outputable @@ -957,8 +957,8 @@ deepSplitCprType_maybe _ _ _ = Nothing findTypeShape :: FamInstEnvs -> Type -> TypeShape -- Uncover the arrow and product shape of a type --- The data type TypeShape is defined in Demand --- See Note [Trimming a demand to a type] in Demand +-- The data type TypeShape is defined in GHC.Types.Demand +-- See Note [Trimming a demand to a type] in GHC.Types.Demand findTypeShape fam_envs ty | Just (tc, tc_args) <- splitTyConApp_maybe ty , Just con <- isDataProductTyCon_maybe tc @@ -1197,7 +1197,7 @@ mk_absent_let dflags fam_envs arg -- determinism, because with different uniques the strings -- will have different lengths and hence different costs for -- the inliner leading to different inlining. - -- See also Note [Unique Determinism] in Unique + -- See also Note [Unique Determinism] in GHC.Types.Unique unlifted_rhs = mkTyApps (Lit rubbishLit) [arg_ty] mk_ww_local :: Unique -> (Type, StrictnessMark) -> Id diff --git a/compiler/GHC/Core/PatSyn.hs b/compiler/GHC/Core/PatSyn.hs index 7f84e92e3f..cf2aaf1ad0 100644 --- a/compiler/GHC/Core/PatSyn.hs +++ b/compiler/GHC/Core/PatSyn.hs @@ -28,13 +28,13 @@ import GhcPrelude import GHC.Core.Type import GHC.Core.TyCo.Ppr -import Name +import GHC.Types.Name import Outputable -import Unique +import GHC.Types.Unique import Util -import BasicTypes -import Var -import FieldLabel +import GHC.Types.Basic +import GHC.Types.Var +import GHC.Types.FieldLabel import qualified Data.Data as Data import Data.Function diff --git a/compiler/GHC/Core/PatSyn.hs-boot b/compiler/GHC/Core/PatSyn.hs-boot index 8ce7621450..d4f816d13d 100644 --- a/compiler/GHC/Core/PatSyn.hs-boot +++ b/compiler/GHC/Core/PatSyn.hs-boot @@ -1,9 +1,9 @@ module GHC.Core.PatSyn where -import BasicTypes (Arity) +import GHC.Types.Basic (Arity) import {-# SOURCE #-} GHC.Core.TyCo.Rep (Type) -import Var (TyVar) -import Name (Name) +import GHC.Types.Var (TyVar) +import GHC.Types.Name (Name) data PatSyn diff --git a/compiler/GHC/Core/Ppr.hs b/compiler/GHC/Core/Ppr.hs index 0ab98c3208..df12815e6c 100644 --- a/compiler/GHC/Core/Ppr.hs +++ b/compiler/GHC/Core/Ppr.hs @@ -21,23 +21,23 @@ import GhcPrelude import GHC.Core import GHC.Core.Stats (exprStats) -import Literal( pprLiteral ) -import Name( pprInfixName, pprPrefixName ) -import Var -import Id -import IdInfo -import Demand -import Cpr +import GHC.Types.Literal( pprLiteral ) +import GHC.Types.Name( pprInfixName, pprPrefixName ) +import GHC.Types.Var +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.TyCo.Ppr import GHC.Core.Coercion -import BasicTypes +import GHC.Types.Basic import Maybes import Util import Outputable import FastString -import SrcLoc ( pprUserRealSpan ) +import GHC.Types.SrcLoc ( pprUserRealSpan ) {- ************************************************************************ diff --git a/compiler/GHC/Core/Ppr/TyThing.hs b/compiler/GHC/Core/Ppr/TyThing.hs index bf3450c447..6782ba1518 100644 --- a/compiler/GHC/Core/Ppr/TyThing.hs +++ b/compiler/GHC/Core/Ppr/TyThing.hs @@ -29,8 +29,8 @@ import GHC.Driver.Types( tyThingParent_maybe ) import GHC.Iface.Make ( tyThingToIfaceDecl ) import GHC.Core.FamInstEnv( FamInst(..), FamFlavor(..) ) import GHC.Core.TyCo.Ppr ( pprUserForAll, pprTypeApp, pprSigmaType ) -import Name -import VarEnv( emptyTidyEnv ) +import GHC.Types.Name +import GHC.Types.Var.Env( emptyTidyEnv ) import Outputable -- ----------------------------------------------------------------------------- diff --git a/compiler/GHC/Core/Predicate.hs b/compiler/GHC/Core/Predicate.hs index e84333283d..b57278fba2 100644 --- a/compiler/GHC/Core/Predicate.hs +++ b/compiler/GHC/Core/Predicate.hs @@ -33,7 +33,7 @@ import GhcPrelude import GHC.Core.Type import GHC.Core.Class import GHC.Core.TyCon -import Var +import GHC.Types.Var import GHC.Core.Coercion import PrelNames diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs index 30b652655d..0b1c0cccb9 100644 --- a/compiler/GHC/Core/Rules.hs +++ b/compiler/GHC/Core/Rules.hs @@ -31,7 +31,7 @@ module GHC.Core.Rules ( import GhcPrelude import GHC.Core -- All of it -import Module ( Module, ModuleSet, elemModuleSet ) +import GHC.Types.Module ( Module, ModuleSet, elemModuleSet ) import GHC.Core.Subst import GHC.Core.SimpleOpt ( exprIsLambda_maybe ) import GHC.Core.FVs ( exprFreeVars, exprsFreeVars, bindFreeVars @@ -47,18 +47,19 @@ import TcType ( tcSplitTyConApp_maybe ) import TysWiredIn ( anyTypeOfKind ) import GHC.Core.Coercion as Coercion import GHC.Core.Op.Tidy ( tidyRules ) -import Id -import IdInfo ( RuleInfo( RuleInfo ) ) -import Var -import VarEnv -import VarSet -import Name ( Name, NamedThing(..), nameIsLocalOrFrom ) -import NameSet -import NameEnv -import UniqFM +import GHC.Types.Id +import GHC.Types.Id.Info ( RuleInfo( RuleInfo ) ) +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Name ( Name, NamedThing(..), nameIsLocalOrFrom ) +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.Unique.FM import GHC.Core.Unify as Unify ( ruleMatchTyKiX ) -import BasicTypes -import GHC.Driver.Session hiding (ruleCheck) +import GHC.Types.Basic +import GHC.Driver.Session ( DynFlags, gopt, targetPlatform ) +import GHC.Driver.Flags import Outputable import FastString import Maybes diff --git a/compiler/GHC/Core/Seq.hs b/compiler/GHC/Core/Seq.hs index 13a0841503..451a6fa4e3 100644 --- a/compiler/GHC/Core/Seq.hs +++ b/compiler/GHC/Core/Seq.hs @@ -13,15 +13,15 @@ module GHC.Core.Seq ( import GhcPrelude import GHC.Core -import IdInfo -import Demand( seqDemand, seqStrictSig ) -import Cpr( seqCprSig ) -import BasicTypes( seqOccInfo ) -import VarSet( seqDVarSet ) -import Var( varType, tyVarKind ) +import GHC.Types.Id.Info +import GHC.Types.Demand( seqDemand, seqStrictSig ) +import GHC.Types.Cpr( seqCprSig ) +import GHC.Types.Basic( seqOccInfo ) +import GHC.Types.Var.Set( seqDVarSet ) +import GHC.Types.Var( varType, tyVarKind ) import GHC.Core.Type( seqType, isTyVar ) import GHC.Core.Coercion( seqCo ) -import Id( Id, idInfo ) +import GHC.Types.Id( Id, idInfo ) -- | Evaluate all the fields of the 'IdInfo' that are generally demanded by the -- compiler diff --git a/compiler/GHC/Core/SimpleOpt.hs b/compiler/GHC/Core/SimpleOpt.hs index 3510fcc3ae..eebac97ade 100644 --- a/compiler/GHC/Core/SimpleOpt.hs +++ b/compiler/GHC/Core/SimpleOpt.hs @@ -32,14 +32,14 @@ import {-# SOURCE #-} GHC.Core.Unfold( mkUnfolding ) import GHC.Core.Make ( FloatBind(..) ) import GHC.Core.Ppr ( pprCoreBindings, pprRules ) import GHC.Core.Op.OccurAnal( occurAnalyseExpr, occurAnalysePgm ) -import Literal ( Literal(LitString) ) -import Id -import IdInfo ( unfoldingInfo, setUnfoldingInfo, setRuleInfo, IdInfo (..) ) -import Var ( isNonCoVarId ) -import VarSet -import VarEnv +import GHC.Types.Literal ( Literal(LitString) ) +import GHC.Types.Id +import GHC.Types.Id.Info ( unfoldingInfo, setUnfoldingInfo, setRuleInfo, IdInfo (..) ) +import GHC.Types.Var ( isNonCoVarId ) +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Core.DataCon -import Demand( etaExpandStrictSig ) +import GHC.Types.Demand( etaExpandStrictSig ) import GHC.Core.Coercion.Opt ( optCoercion ) import GHC.Core.Type hiding ( substTy, extendTvSubst, extendCvSubst, extendTvSubstList , isInScope, substTyVarBndr, cloneTyVarBndr ) @@ -47,8 +47,8 @@ import GHC.Core.Coercion hiding ( substCo, substCoVarBndr ) import GHC.Core.TyCon ( tyConArity ) import TysWiredIn import PrelNames -import BasicTypes -import Module ( Module ) +import GHC.Types.Basic +import GHC.Types.Module ( Module ) import ErrUtils import GHC.Driver.Session import Outputable @@ -673,7 +673,7 @@ unfolding. Also see Note [Desugaring coerce as cast] in GHC.HsToCore. However, we don't want to inline 'seq', which happens to also have a compulsory unfolding, so we only do this unfolding only for things -that are always-active. See Note [User-defined RULES for seq] in MkId. +that are always-active. See Note [User-defined RULES for seq] in GHC.Types.Id.Make. Note [Getting the map/coerce RULE to work] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -965,7 +965,7 @@ data ConCont = CC [CoreExpr] Coercion -- [exprIsConApp_maybe on data constructors with wrappers]. Data constructor wrappers -- are unfolded late, but we really want to trigger case-of-known-constructor as -- early as possible. See also Note [Activation for data constructor wrappers] --- in MkId. +-- in GHC.Types.Id.Make. -- -- We also return the incoming InScopeSet, augmented with -- the binders from any [FloatBind] that we return diff --git a/compiler/GHC/Core/Stats.hs b/compiler/GHC/Core/Stats.hs index 148255e140..29f2f44df4 100644 --- a/compiler/GHC/Core/Stats.hs +++ b/compiler/GHC/Core/Stats.hs @@ -13,13 +13,13 @@ module GHC.Core.Stats ( import GhcPrelude -import BasicTypes +import GHC.Types.Basic import GHC.Core import Outputable import GHC.Core.Coercion -import Var +import GHC.Types.Var import GHC.Core.Type(Type, typeSize) -import Id (isJoinId) +import GHC.Types.Id (isJoinId) data CoreStats = CS { cs_tm :: !Int -- Terms , cs_ty :: !Int -- Types diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs index 672786aaa6..e36e4fb289 100644 --- a/compiler/GHC/Core/Subst.hs +++ b/compiler/GHC/Core/Subst.hs @@ -53,13 +53,13 @@ import GHC.Core.Type hiding import GHC.Core.Coercion hiding ( substCo, substCoVarBndr ) import PrelNames -import VarSet -import VarEnv -import Id -import Name ( Name ) -import Var -import IdInfo -import UniqSupply +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Id +import GHC.Types.Name ( Name ) +import GHC.Types.Var +import GHC.Types.Id.Info +import GHC.Types.Unique.Supply import Maybes import Util import Outputable diff --git a/compiler/GHC/Core/TyCo/FVs.hs b/compiler/GHC/Core/TyCo/FVs.hs index 82d7699ed3..30d16c1faf 100644 --- a/compiler/GHC/Core/TyCo/FVs.hs +++ b/compiler/GHC/Core/TyCo/FVs.hs @@ -50,12 +50,12 @@ import {-# SOURCE #-} GHC.Core.Type (coreView, partitionInvisibleTypes) import Data.Monoid as DM ( Endo(..), All(..) ) import GHC.Core.TyCo.Rep import GHC.Core.TyCon -import Var +import GHC.Types.Var import FV -import UniqFM -import VarSet -import VarEnv +import GHC.Types.Unique.FM +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Util import Panic diff --git a/compiler/GHC/Core/TyCo/Ppr.hs b/compiler/GHC/Core/TyCo/Ppr.hs index 3d4c065aba..bc4e9b48e5 100644 --- a/compiler/GHC/Core/TyCo/Ppr.hs +++ b/compiler/GHC/Core/TyCo/Ppr.hs @@ -43,16 +43,16 @@ import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Tidy import GHC.Core.TyCo.FVs import GHC.Core.Class -import Var +import GHC.Types.Var import GHC.Iface.Type -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Outputable -import BasicTypes ( PprPrec(..), topPrec, sigPrec, opPrec - , funPrec, appPrec, maybeParen ) +import GHC.Types.Basic ( PprPrec(..), topPrec, sigPrec, opPrec + , funPrec, appPrec, maybeParen ) {- %************************************************************************ @@ -71,7 +71,7 @@ works just by setting the initial context precedence very high. Note that any function which pretty-prints a @Type@ first converts the @Type@ to an @IfaceType@. See Note [IfaceType and pretty-printing] in GHC.Iface.Type. -See Note [Precedence in types] in BasicTypes. +See Note [Precedence in types] in GHC.Types.Basic. -} -------------------------------------------------------- diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs index 1f2fd6cf19..1f96dd563b 100644 --- a/compiler/GHC/Core/TyCo/Rep.hs +++ b/compiler/GHC/Core/TyCo/Rep.hs @@ -80,14 +80,14 @@ import {-# SOURCE #-} GHC.Core.ConLike ( ConLike(..), conLikeName ) -- friends: import GHC.Iface.Type -import Var -import VarSet -import Name hiding ( varName ) +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Name hiding ( varName ) import GHC.Core.TyCon import GHC.Core.Coercion.Axiom -- others -import BasicTypes ( LeftOrRight(..), pickLR ) +import GHC.Types.Basic ( LeftOrRight(..), pickLR ) import Outputable import FastString import Util diff --git a/compiler/GHC/Core/TyCo/Rep.hs-boot b/compiler/GHC/Core/TyCo/Rep.hs-boot index 2ffc19795c..c7ce05f0a6 100644 --- a/compiler/GHC/Core/TyCo/Rep.hs-boot +++ b/compiler/GHC/Core/TyCo/Rep.hs-boot @@ -1,7 +1,7 @@ module GHC.Core.TyCo.Rep where import Data.Data ( Data ) -import {-# SOURCE #-} Var( Var, ArgFlag, AnonArgFlag ) +import {-# SOURCE #-} GHC.Types.Var( Var, ArgFlag, AnonArgFlag ) data Type data TyThing diff --git a/compiler/GHC/Core/TyCo/Subst.hs b/compiler/GHC/Core/TyCo/Subst.hs index 14eee30633..a4d0c49b46 100644 --- a/compiler/GHC/Core/TyCo/Subst.hs +++ b/compiler/GHC/Core/TyCo/Subst.hs @@ -70,16 +70,16 @@ import GHC.Core.TyCo.Rep import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Ppr -import Var -import VarSet -import VarEnv +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Pair import Util -import UniqSupply -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique.Supply +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Outputable import Data.List (mapAccumL) diff --git a/compiler/GHC/Core/TyCo/Tidy.hs b/compiler/GHC/Core/TyCo/Tidy.hs index 3e41e922cc..f18ee4f132 100644 --- a/compiler/GHC/Core/TyCo/Tidy.hs +++ b/compiler/GHC/Core/TyCo/Tidy.hs @@ -23,9 +23,9 @@ import GhcPrelude import GHC.Core.TyCo.Rep import GHC.Core.TyCo.FVs (tyCoVarsOfTypesWellScoped, tyCoVarsOfTypeList) -import Name hiding (varName) -import Var -import VarEnv +import GHC.Types.Name hiding (varName) +import GHC.Types.Var +import GHC.Types.Var.Env import Util (seqList) import Data.List (mapAccumL) @@ -59,7 +59,7 @@ tidyVarBndr tidy_env@(occ_env, subst) var avoidNameClashes :: [TyCoVar] -> TidyEnv -> TidyEnv -- Seed the occ_env with clashes among the names, see --- Note [Tidying multiple names at once] in OccName +-- Note [Tidying multiple names at once] in GHC.Types.Names.OccName avoidNameClashes tvs (occ_env, subst) = (avoidClashesOccEnv occ_env occs, subst) where diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs index e99f840bb9..11fd1cf5a9 100644 --- a/compiler/GHC/Core/TyCon.hs +++ b/compiler/GHC/Core/TyCon.hs @@ -150,24 +150,24 @@ import {-# SOURCE #-} GHC.Core.DataCon , isUnboxedSumCon ) import Binary -import Var -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Set import GHC.Core.Class -import BasicTypes -import ForeignCall -import Name -import NameEnv +import GHC.Types.Basic +import GHC.Types.ForeignCall +import GHC.Types.Name +import GHC.Types.Name.Env import GHC.Core.Coercion.Axiom import PrelNames import Maybes import Outputable import FastStringEnv -import FieldLabel +import GHC.Types.FieldLabel import Constants import Util -import Unique( tyConRepNameUnique, dataConTyRepNameUnique ) -import UniqSet -import Module +import GHC.Types.Unique( tyConRepNameUnique, dataConTyRepNameUnique ) +import GHC.Types.Unique.Set +import GHC.Types.Module import qualified Data.Data as Data @@ -213,7 +213,7 @@ We also support injective type families -- see Note [Injective type families] Note [Data type families] ~~~~~~~~~~~~~~~~~~~~~~~~~ -See also Note [Wrappers for data instance tycons] in MkId.hs +See also Note [Wrappers for data instance tycons] in GHC.Types.Id.Make * Data type families are declared thus data family T a :: * diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 3e86e86cf4..03e71ad915 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -223,7 +223,7 @@ module GHC.Core.Type ( import GhcPrelude -import BasicTypes +import GHC.Types.Basic -- We import the representation and primitive functions from GHC.Core.TyCo.Rep. -- Many things are reexported, but not the representation! @@ -234,10 +234,10 @@ import GHC.Core.TyCo.Tidy import GHC.Core.TyCo.FVs -- friends: -import Var -import VarEnv -import VarSet -import UniqSet +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Unique.Set import GHC.Core.TyCon import TysPrim @@ -245,7 +245,7 @@ import {-# SOURCE #-} TysWiredIn ( listTyCon, typeNatKind , typeSymbolKind, liftedTypeKind , liftedTypeKindTyCon , constraintKind ) -import Name( Name ) +import GHC.Types.Name( Name ) import PrelNames import GHC.Core.Coercion.Axiom import {-# SOURCE #-} GHC.Core.Coercion @@ -265,7 +265,7 @@ import Outputable import FastString import Pair import ListSetOps -import Unique ( nonDetCmpUnique ) +import GHC.Types.Unique ( nonDetCmpUnique ) import Maybes ( orElse ) import Data.Maybe ( isJust ) diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs index 49006c66b6..411a954428 100644 --- a/compiler/GHC/Core/Unfold.hs +++ b/compiler/GHC/Core/Unfold.hs @@ -50,23 +50,23 @@ import GHC.Driver.Session import GHC.Core import GHC.Core.Op.OccurAnal ( occurAnalyseExpr_NoBinderSwap ) import GHC.Core.SimpleOpt -import GHC.Core.Arity ( manifestArity ) +import GHC.Core.Arity ( manifestArity ) import GHC.Core.Utils -import Id -import Demand ( isBottomingSig ) +import GHC.Types.Id +import GHC.Types.Demand ( isBottomingSig ) import GHC.Core.DataCon -import Literal +import GHC.Types.Literal import PrimOp -import IdInfo -import BasicTypes ( Arity, InlineSpec(..), inlinePragmaSpec ) +import GHC.Types.Id.Info +import GHC.Types.Basic ( Arity, InlineSpec(..), inlinePragmaSpec ) import GHC.Core.Type import PrelNames import TysPrim ( realWorldStatePrimTy ) import Bag import Util import Outputable -import ForeignCall -import Name +import GHC.Types.ForeignCall +import GHC.Types.Name import ErrUtils import qualified Data.ByteString as BS diff --git a/compiler/GHC/Core/Unify.hs b/compiler/GHC/Core/Unify.hs index 10b1a85342..99c206472c 100644 --- a/compiler/GHC/Core/Unify.hs +++ b/compiler/GHC/Core/Unify.hs @@ -28,10 +28,10 @@ module GHC.Core.Unify ( import GhcPrelude -import Var -import VarEnv -import VarSet -import Name( Name ) +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Name( Name ) import GHC.Core.Type hiding ( getTvSubstEnv ) import GHC.Core.Coercion hiding ( getCvSubstEnv ) import GHC.Core.TyCon @@ -42,8 +42,8 @@ import FV( FV, fvVarSet, fvVarList ) import Util import Pair import Outputable -import UniqFM -import UniqSet +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Control.Monad import qualified Control.Monad.Fail as MonadFail diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index e10029c988..4663f54b26 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -69,29 +69,29 @@ import GHC.Core import PrelNames ( makeStaticName ) import GHC.Core.Ppr import GHC.Core.FVs( exprFreeVars ) -import Var -import SrcLoc -import VarEnv -import VarSet -import Name -import Literal +import GHC.Types.Var +import GHC.Types.SrcLoc +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Name +import GHC.Types.Literal import GHC.Core.DataCon import PrimOp -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import PrelNames( absentErrorIdKey ) import GHC.Core.Type as Type import GHC.Core.Predicate import GHC.Core.TyCo.Rep( TyCoBinder(..), TyBinder ) import GHC.Core.Coercion import GHC.Core.TyCon -import Unique +import GHC.Types.Unique import Outputable import TysPrim import FastString import Maybes import ListSetOps ( minusList ) -import BasicTypes ( Arity, isConLike ) +import GHC.Types.Basic ( Arity, isConLike ) import Util import Pair import Data.ByteString ( ByteString ) @@ -100,7 +100,7 @@ import Data.List import Data.Ord ( comparing ) import OrdList import qualified Data.Set as Set -import UniqSet +import GHC.Types.Unique.Set {- ************************************************************************ @@ -1332,7 +1332,7 @@ expansion. Specifically: * True of constructor applications (K a b) -* True of applications of a "CONLIKE" Id; see Note [CONLIKE pragma] in BasicTypes. +* True of applications of a "CONLIKE" Id; see Note [CONLIKE pragma] in GHC.Types.Basic. (NB: exprIsCheap might not be true of this) * False of case-expressions. If we have diff --git a/compiler/GHC/CoreToByteCode.hs b/compiler/GHC/CoreToByteCode.hs index f16d77f782..75a2110e1d 100644 --- a/compiler/GHC/CoreToByteCode.hs +++ b/compiler/GHC/CoreToByteCode.hs @@ -21,20 +21,20 @@ import GHC.ByteCode.Types import GHC.Runtime.Interpreter import GHCi.FFI import GHCi.RemoteTypes -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import Outputable import GHC.Platform -import Name -import MkId -import Id -import Var ( updateVarType ) -import ForeignCall +import GHC.Types.Name +import GHC.Types.Id.Make +import GHC.Types.Id +import GHC.Types.Var ( updateVarType ) +import GHC.Types.ForeignCall import GHC.Driver.Types import GHC.Core.Utils import GHC.Core import GHC.Core.Ppr -import Literal +import GHC.Types.Literal import PrimOp import GHC.Core.FVs import GHC.Core.Type @@ -42,20 +42,20 @@ import GHC.Types.RepType import GHC.Core.DataCon import GHC.Core.TyCon import Util -import VarSet +import GHC.Types.Var.Set import TysPrim import GHC.Core.TyCo.Ppr ( pprType ) import ErrUtils -import Unique +import GHC.Types.Unique import FastString import Panic -import GHC.StgToCmm.Closure ( NonVoid(..), fromNonVoid, nonVoidIds ) +import GHC.StgToCmm.Closure ( NonVoid(..), fromNonVoid, nonVoidIds ) import GHC.StgToCmm.Layout import GHC.Runtime.Heap.Layout hiding (WordOff, ByteOff, wordsToBytes) import GHC.Data.Bitmap import OrdList import Maybes -import VarEnv +import GHC.Types.Var.Env import PrelNames ( unsafeEqualityProofName ) import Data.List @@ -63,8 +63,8 @@ import Foreign import Control.Monad import Data.Char -import UniqSupply -import Module +import GHC.Types.Unique.Supply +import GHC.Types.Module import Control.Exception import Data.Array diff --git a/compiler/GHC/CoreToIface.hs b/compiler/GHC/CoreToIface.hs index ee24c60bee..7b54138925 100644 --- a/compiler/GHC/CoreToIface.hs +++ b/compiler/GHC/CoreToIface.hs @@ -49,29 +49,29 @@ import GhcPrelude import GHC.Iface.Syntax import GHC.Core.DataCon -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core import GHC.Core.TyCon hiding ( pprPromotionQuote ) import GHC.Core.Coercion.Axiom import TysPrim ( eqPrimTyCon, eqReprPrimTyCon ) import TysWiredIn ( heqTyCon ) -import MkId ( noinlineIdName ) +import GHC.Types.Id.Make ( noinlineIdName ) import PrelNames -import Name -import BasicTypes +import GHC.Types.Name +import GHC.Types.Basic import GHC.Core.Type import GHC.Core.PatSyn import Outputable import FastString import Util -import Var -import VarEnv -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Tidy ( tidyCo ) -import Demand ( isTopSig ) -import Cpr ( topCprSig ) +import GHC.Types.Demand ( isTopSig ) +import GHC.Types.Cpr ( topCprSig ) import Data.Maybe ( catMaybes ) diff --git a/compiler/GHC/CoreToIface.hs-boot b/compiler/GHC/CoreToIface.hs-boot index 7daa190405..431d2b0aa5 100644 --- a/compiler/GHC/CoreToIface.hs-boot +++ b/compiler/GHC/CoreToIface.hs-boot @@ -3,10 +3,10 @@ module GHC.CoreToIface where import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, TyLit, Coercion ) import {-# SOURCE #-} GHC.Iface.Type( IfaceType, IfaceTyCon, IfaceForAllBndr , IfaceCoercion, IfaceTyLit, IfaceAppArgs ) -import Var ( TyCoVarBinder ) -import VarEnv ( TidyEnv ) +import GHC.Types.Var ( TyCoVarBinder ) +import GHC.Types.Var.Env ( TidyEnv ) import GHC.Core.TyCon ( TyCon ) -import VarSet( VarSet ) +import GHC.Types.Var.Set( VarSet ) -- For GHC.Core.TyCo.Rep toIfaceTypeX :: VarSet -> Type -> IfaceType diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs index a866f57b6b..0ebe4a8f90 100644 --- a/compiler/GHC/CoreToStg.hs +++ b/compiler/GHC/CoreToStg.hs @@ -26,27 +26,27 @@ import GHC.Stg.Syntax import GHC.Core.Type import GHC.Types.RepType import GHC.Core.TyCon -import MkId ( coercionTokenId ) -import Id -import IdInfo +import GHC.Types.Id.Make ( coercionTokenId ) +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.DataCon -import CostCentre -import VarEnv -import Module -import Name ( isExternalName, nameModule_maybe ) -import BasicTypes ( Arity ) +import GHC.Types.CostCentre +import GHC.Types.Var.Env +import GHC.Types.Module +import GHC.Types.Name ( isExternalName, nameModule_maybe ) +import GHC.Types.Basic ( Arity ) import TysWiredIn ( unboxedUnitDataCon, unitDataConId ) -import Literal +import GHC.Types.Literal import Outputable import MonadUtils import FastString import Util import GHC.Driver.Session import GHC.Driver.Ways -import ForeignCall -import Demand ( isUsedOnce ) +import GHC.Types.ForeignCall +import GHC.Types.Demand ( isUsedOnce ) import PrimOp ( PrimCall(..), primOpWrapperId ) -import SrcLoc ( mkGeneralSrcSpan ) +import GHC.Types.SrcLoc ( mkGeneralSrcSpan ) import PrelNames ( unsafeEqualityProofName ) import Data.List.NonEmpty (nonEmpty, toList) diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs index fb46438049..b6a14b4af5 100644 --- a/compiler/GHC/CoreToStg/Prep.hs +++ b/compiler/GHC/CoreToStg/Prep.hs @@ -24,30 +24,30 @@ import GHC.Core.Op.OccurAnal import GHC.Driver.Types import PrelNames -import MkId ( realWorldPrimId ) +import GHC.Types.Id.Make ( realWorldPrimId ) import GHC.Core.Utils import GHC.Core.Arity import GHC.Core.FVs -import GHC.Core.Op.Monad ( CoreToDo(..) ) +import GHC.Core.Op.Monad ( CoreToDo(..) ) import GHC.Core.Lint ( endPassIO ) import GHC.Core import GHC.Core.Make hiding( FloatBind(..) ) -- We use our own FloatBind here import GHC.Core.Type -import Literal +import GHC.Types.Literal import GHC.Core.Coercion import TcEnv import GHC.Core.TyCon -import Demand -import Var -import VarSet -import VarEnv -import Id -import IdInfo +import GHC.Types.Demand +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Id +import GHC.Types.Id.Info import TysWiredIn import GHC.Core.DataCon -import BasicTypes -import Module -import UniqSupply +import GHC.Types.Basic +import GHC.Types.Module +import GHC.Types.Unique.Supply import Maybes import OrdList import ErrUtils @@ -56,12 +56,12 @@ import GHC.Driver.Ways import Util import Outputable import FastString -import Name ( NamedThing(..), nameSrcSpan, isInternalName ) -import SrcLoc ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc ) +import GHC.Types.Name ( NamedThing(..), nameSrcSpan, isInternalName ) +import GHC.Types.SrcLoc ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc ) import Data.Bits import MonadUtils ( mapAccumLM ) import Control.Monad -import CostCentre ( CostCentre, ccFromThisModule ) +import GHC.Types.CostCentre ( CostCentre, ccFromThisModule ) import qualified Data.Set as S {- @@ -112,7 +112,7 @@ The goal of this pass is to prepare for code generation. We want curried definitions for all of these in case they aren't inlined by some caller. -9. Replace (lazy e) by e. See Note [lazyId magic] in MkId.hs +9. Replace (lazy e) by e. See Note [lazyId magic] in GHC.Types.Id.Make Also replace (noinline e) by e. 10. Convert (LitInteger i t) into the core representation @@ -658,7 +658,7 @@ cvtLitInteger :: Platform -> Id -> Maybe DataCon -> Integer -> CoreExpr -- representation. Exactly how we do this depends on the -- library that implements Integer. If it's GMP we -- use the S# data constructor for small literals. --- See Note [Integer literals] in Literal +-- See Note [Integer literals] in GHC.Types.Literal cvtLitInteger platform _ (Just sdatacon) i | platformInIntRange platform i -- Special case for small integers = mkConApp sdatacon [Lit (mkLitInt platform i)] @@ -678,7 +678,7 @@ cvtLitInteger platform mk_integer _ i cvtLitNatural :: Platform -> Id -> Maybe DataCon -> Integer -> CoreExpr -- Here we convert a literal Natural to the low-level -- representation. --- See Note [Natural literals] in Literal +-- See Note [Natural literals] in GHC.Types.Literal cvtLitNatural platform _ (Just sdatacon) i | platformInWordRange platform i -- Special case for small naturals = mkConApp sdatacon [Lit (mkLitWord platform i)] @@ -771,7 +771,7 @@ which happened in #11291, we do /not/ want to turn it into (case bot of {}) realWorldPrimId# because that gives a panic in CoreToStg.myCollectArgs, which expects only variables in function position. But if we are sure to make -runRW# strict (which we do in MkId), this can't happen +runRW# strict (which we do in GHC.Types.Id.Make), this can't happen -} cpeApp :: CorePrepEnv -> CoreExpr -> UniqSM (Floats, CpeRhs) @@ -899,7 +899,7 @@ cpeApp top_env expr CpeApp arg@(Coercion {}) -> rebuild_app as (App fun' arg) (funResultTy fun_ty) floats ss CpeApp arg -> do - let (ss1, ss_rest) -- See Note [lazyId magic] in MkId + let (ss1, ss_rest) -- See Note [lazyId magic] in GHC.Types.Id.Make = case (ss, isLazyExpr arg) of (_ : ss_rest, True) -> (topDmd, ss_rest) (ss1 : ss_rest, False) -> (ss1, ss_rest) @@ -918,7 +918,7 @@ cpeApp top_env expr rebuild_app as fun' fun_ty (addFloat floats (FloatTick tickish)) ss isLazyExpr :: CoreExpr -> Bool --- See Note [lazyId magic] in MkId +-- See Note [lazyId magic] in GHC.Types.Id.Make isLazyExpr (Cast e _) = isLazyExpr e isLazyExpr (Tick _ e) = isLazyExpr e isLazyExpr (Var f `App` _ `App` _) = f `hasKey` lazyIdKey @@ -1411,7 +1411,7 @@ The solution is CorePrep to have a miniature inlining pass which deals with cases like this. We can then drop the let-binding altogether. Why does the removal of 'lazy' have to occur in CorePrep? -The gory details are in Note [lazyId magic] in MkId, but the +The gory details are in Note [lazyId magic] in GHC.Types.Id.Make, but the main reason is that lazy must appear in unfoldings (optimizer output) and it must prevent call-by-value for catch# (which is implemented by CorePrep.) diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs index a82c9c562f..61cac8bb40 100644 --- a/compiler/GHC/Driver/Backpack.hs +++ b/compiler/GHC/Driver/Backpack.hs @@ -32,23 +32,23 @@ import GHC.Driver.Monad import GHC.Driver.Session import TcRnMonad import TcRnDriver -import Module +import GHC.Types.Module import GHC.Driver.Types import StringBuffer import FastString import ErrUtils -import SrcLoc +import GHC.Types.SrcLoc import GHC.Driver.Main -import UniqFM -import UniqDFM +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM import Outputable import Maybes import HeaderInfo import GHC.Iface.Recomp import GHC.Driver.Make -import UniqDSet +import GHC.Types.Unique.DSet import PrelNames -import BasicTypes hiding (SuccessFlag(..)) +import GHC.Types.Basic hiding (SuccessFlag(..)) import GHC.Driver.Finder import Util diff --git a/compiler/GHC/Driver/Backpack/Syntax.hs b/compiler/GHC/Driver/Backpack/Syntax.hs index 709427ebd0..7a119907da 100644 --- a/compiler/GHC/Driver/Backpack/Syntax.hs +++ b/compiler/GHC/Driver/Backpack/Syntax.hs @@ -20,9 +20,9 @@ import GhcPrelude import GHC.Driver.Phases import GHC.Hs -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import Module +import GHC.Types.Module import UnitInfo {- diff --git a/compiler/GHC/Driver/CmdLine.hs b/compiler/GHC/Driver/CmdLine.hs index 9b71e3d3fb..243831cfc5 100644 --- a/compiler/GHC/Driver/CmdLine.hs +++ b/compiler/GHC/Driver/CmdLine.hs @@ -32,7 +32,7 @@ import Util import Outputable import Panic import Bag -import SrcLoc +import GHC.Types.SrcLoc import Json import Data.Function diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs index 507311c039..45c40d2c30 100644 --- a/compiler/GHC/Driver/CodeOutput.hs +++ b/compiler/GHC/Driver/CodeOutput.hs @@ -15,7 +15,7 @@ import GhcPrelude import GHC.CmmToAsm ( nativeCodeGen ) import GHC.CmmToLlvm ( llvmCodeGen ) -import UniqSupply ( mkSplitUniqSupply ) +import GHC.Types.Unique.Supply ( mkSplitUniqSupply ) import GHC.Driver.Finder ( mkStubPaths ) import GHC.CmmToC ( writeC ) @@ -30,8 +30,8 @@ import FileCleanup import ErrUtils import Outputable -import Module -import SrcLoc +import GHC.Types.Module +import GHC.Types.SrcLoc import Control.Exception import System.Directory diff --git a/compiler/GHC/Driver/Finder.hs b/compiler/GHC/Driver/Finder.hs index c7c9c1af1f..a9f0fda13e 100644 --- a/compiler/GHC/Driver/Finder.hs +++ b/compiler/GHC/Driver/Finder.hs @@ -35,7 +35,7 @@ module GHC.Driver.Finder ( import GhcPrelude -import Module +import GHC.Types.Module import GHC.Driver.Types import GHC.Driver.Packages import FastString diff --git a/compiler/GHC/Driver/Hooks.hs b/compiler/GHC/Driver/Hooks.hs index 0fbb10bb89..51ea03dac1 100644 --- a/compiler/GHC/Driver/Hooks.hs +++ b/compiler/GHC/Driver/Hooks.hs @@ -39,18 +39,18 @@ import GHC.Hs.Expr import OrdList import TcRnTypes import Bag -import RdrName -import Name -import Id +import GHC.Types.Name.Reader +import GHC.Types.Name +import GHC.Types.Id import GHC.Core import GHCi.RemoteTypes -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.Type import System.Process -import BasicTypes -import Module +import GHC.Types.Basic +import GHC.Types.Module import GHC.Core.TyCon -import CostCentre +import GHC.Types.CostCentre import GHC.Stg.Syntax import Stream import GHC.Cmm diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index 083bfd279a..1b35e34aff 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -88,7 +88,7 @@ import GhcPrelude import Data.Data hiding (Fixity, TyCon) import Data.Maybe ( fromJust ) -import Id +import GHC.Types.Id import GHC.Runtime.Interpreter ( addSptEntry ) import GHCi.RemoteTypes ( ForeignHValue ) import GHC.CoreToByteCode ( byteCodeGen, coreExprToBCOs ) @@ -96,26 +96,26 @@ import GHC.Runtime.Linker import GHC.Core.Op.Tidy ( tidyExpr ) import GHC.Core.Type ( Type, Kind ) import GHC.Core.Lint ( lintInteractiveExpr ) -import VarEnv ( emptyTidyEnv ) +import GHC.Types.Var.Env ( emptyTidyEnv ) import Panic import GHC.Core.ConLike import ApiAnnotation -import Module +import GHC.Types.Module import GHC.Driver.Packages -import RdrName +import GHC.Types.Name.Reader import GHC.Hs import GHC.Hs.Dump import GHC.Core import StringBuffer import Parser import Lexer -import SrcLoc +import GHC.Types.SrcLoc import TcRnDriver import GHC.IfaceToCore ( typecheckIface ) import TcRnMonad import TcHsSyn ( ZonkFlexi (DefaultFlexi) ) -import NameCache ( initNameCache ) +import GHC.Types.Name.Cache ( initNameCache ) import PrelInfo import GHC.Core.Op.Simplify.Driver import GHC.HsToCore @@ -129,11 +129,11 @@ import GHC.Stg.Syntax import GHC.Stg.FVs ( annTopBindingsFreeVars ) import GHC.Stg.Pipeline ( stg2stg ) import qualified GHC.StgToCmm as StgToCmm ( codeGen ) -import CostCentre -import ProfInit +import GHC.Types.CostCentre +import GHC.Types.CostCentre.Init import GHC.Core.TyCon -import Name -import NameSet +import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Cmm import GHC.Cmm.Parser ( parseCmmFile ) import GHC.Cmm.Info.Build @@ -153,11 +153,11 @@ import GHC.Driver.Session import ErrUtils import Outputable -import NameEnv +import GHC.Types.Name.Env import HscStats ( ppSourceStats ) import GHC.Driver.Types import FastString -import UniqSupply +import GHC.Types.Unique.Supply import Bag import Exception import qualified Stream diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index e1aa392771..051e9d56ce 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -45,31 +45,31 @@ import GHC.Driver.Finder import GHC.Driver.Monad import HeaderInfo import GHC.Driver.Types -import Module +import GHC.Types.Module import GHC.IfaceToCore ( typecheckIface ) import TcRnMonad ( initIfaceCheck ) import GHC.Driver.Main import Bag ( unitBag, listToBag, unionManyBags, isEmptyBag ) -import BasicTypes +import GHC.Types.Basic import Digraph import Exception ( tryIO, gbracket, gfinally ) import FastString import Maybes ( expectJust ) -import Name +import GHC.Types.Name import MonadUtils ( allM ) import Outputable import Panic -import SrcLoc +import GHC.Types.SrcLoc import StringBuffer -import UniqFM -import UniqDSet +import GHC.Types.Unique.FM +import GHC.Types.Unique.DSet import TcBackpack import GHC.Driver.Packages -import UniqSet +import GHC.Types.Unique.Set import Util import qualified GHC.LanguageExtensions as LangExt -import NameEnv +import GHC.Types.Name.Env import FileCleanup import Data.Either ( rights, partitionEithers ) diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs index 7b621ca3c4..385b1de791 100644 --- a/compiler/GHC/Driver/MakeFile.hs +++ b/compiler/GHC/Driver/MakeFile.hs @@ -24,12 +24,12 @@ import GHC.Driver.Ways import Util import GHC.Driver.Types import qualified SysTools -import Module +import GHC.Types.Module import Digraph ( SCC(..) ) import GHC.Driver.Finder import Outputable import Panic -import SrcLoc +import GHC.Types.SrcLoc import Data.List import FastString import FileCleanup diff --git a/compiler/GHC/Driver/Packages.hs b/compiler/GHC/Driver/Packages.hs index e8bed631ff..1f61d5df97 100644 --- a/compiler/GHC/Driver/Packages.hs +++ b/compiler/GHC/Driver/Packages.hs @@ -72,11 +72,11 @@ import GHC.PackageDb import UnitInfo import GHC.Driver.Session import GHC.Driver.Ways -import Name ( Name, nameModule_maybe ) -import UniqFM -import UniqDFM -import UniqSet -import Module +import GHC.Types.Name ( Name, nameModule_maybe ) +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM +import GHC.Types.Unique.Set +import GHC.Types.Module import Util import Panic import GHC.Platform @@ -995,7 +995,7 @@ pprTrustFlag flag = case flag of -- ----------------------------------------------------------------------------- -- Wired-in packages -- --- See Note [Wired-in packages] in Module +-- See Note [Wired-in packages] in GHC.Types.Module type WiredInUnitId = String type WiredPackagesMap = Map WiredUnitId WiredUnitId @@ -1015,7 +1015,7 @@ findWiredInPackages findWiredInPackages dflags prec_map pkgs vis_map = do -- Now we must find our wired-in packages, and rename them to -- their canonical names (eg. base-1.0 ==> base), as described - -- in Note [Wired-in packages] in Module + -- in Note [Wired-in packages] in GHC.Types.Module let matches :: UnitInfo -> WiredInUnitId -> Bool pc `matches` pid @@ -1119,7 +1119,7 @@ findWiredInPackages dflags prec_map pkgs vis_map = do -- Helper functions for rewiring Module and UnitId. These -- rewrite UnitIds of modules in wired-in packages to the form known to the --- compiler, as described in Note [Wired-in packages] in Module. +-- compiler, as described in Note [Wired-in packages] in GHC.Types.Module. -- -- For instance, base-4.9.0.0 will be rewritten to just base, to match -- what appears in PrelNames. diff --git a/compiler/GHC/Driver/Packages.hs-boot b/compiler/GHC/Driver/Packages.hs-boot index 89fb2a1c18..73823c0d3b 100644 --- a/compiler/GHC/Driver/Packages.hs-boot +++ b/compiler/GHC/Driver/Packages.hs-boot @@ -1,7 +1,7 @@ module GHC.Driver.Packages where import GhcPrelude import {-# SOURCE #-} GHC.Driver.Session (DynFlags) -import {-# SOURCE #-} Module(ComponentId, UnitId, InstalledUnitId) +import {-# SOURCE #-} GHC.Types.Module(ComponentId, UnitId, InstalledUnitId) data PackageState data UnitInfoMap data PackageDatabase diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs index 627efeeb41..01e89b5fbe 100644 --- a/compiler/GHC/Driver/Pipeline.hs +++ b/compiler/GHC/Driver/Pipeline.hs @@ -49,15 +49,15 @@ import GHC.Driver.Main import GHC.Driver.Finder import GHC.Driver.Types hiding ( Hsc ) import Outputable -import Module +import GHC.Types.Module import ErrUtils import GHC.Driver.Session import Panic import Util import StringBuffer ( hGetStringBuffer, hPutStringBuffer ) -import BasicTypes ( SuccessFlag(..) ) +import GHC.Types.Basic ( SuccessFlag(..) ) import Maybes ( expectJust ) -import SrcLoc +import GHC.Types.SrcLoc import GHC.CmmToLlvm ( llvmFixupAsm, llvmVersionList ) import MonadUtils import GHC.Platform @@ -69,7 +69,7 @@ import FileCleanup import Ar import Bag ( unitBag ) import FastString ( mkFastString ) -import GHC.Iface.Make ( mkFullIface ) +import GHC.Iface.Make ( mkFullIface ) import UpdateCafInfos ( updateModDetailsCafInfos ) import Exception diff --git a/compiler/GHC/Driver/Pipeline/Monad.hs b/compiler/GHC/Driver/Pipeline/Monad.hs index 5831f923ea..6e07924d1e 100644 --- a/compiler/GHC/Driver/Pipeline/Monad.hs +++ b/compiler/GHC/Driver/Pipeline/Monad.hs @@ -18,7 +18,7 @@ import Outputable import GHC.Driver.Session import GHC.Driver.Phases import GHC.Driver.Types -import Module +import GHC.Types.Module import FileCleanup (TempFileLifetime) import Control.Monad diff --git a/compiler/GHC/Driver/Plugins.hs b/compiler/GHC/Driver/Plugins.hs index 437e68af71..bf2e9fe759 100644 --- a/compiler/GHC/Driver/Plugins.hs +++ b/compiler/GHC/Driver/Plugins.hs @@ -58,7 +58,7 @@ import GHC.Driver.Session import GHC.Driver.Types import GHC.Driver.Monad import GHC.Driver.Phases -import Module ( ModuleName, Module(moduleName)) +import GHC.Types.Module ( ModuleName, Module(moduleName)) import Fingerprint import Data.List (sort) import Outputable (Outputable(..), text, (<+>)) diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index d511701ea1..56d53838f6 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -243,7 +243,7 @@ import GhcPrelude import GHC.Platform import GHC.UniqueSubdir (uniqueSubdir) import PlatformConstants -import Module +import GHC.Types.Module import {-# SOURCE #-} GHC.Driver.Plugins import {-# SOURCE #-} GHC.Driver.Hooks import {-# SOURCE #-} PrelNames ( mAIN ) @@ -263,8 +263,8 @@ import Util import Maybes import MonadUtils import qualified Pretty -import SrcLoc -import BasicTypes ( Alignment, alignmentOf, IntWithInf, treatZeroAsInf ) +import GHC.Types.SrcLoc +import GHC.Types.Basic ( Alignment, alignmentOf, IntWithInf, treatZeroAsInf ) import FastString import Fingerprint import FileSettings diff --git a/compiler/GHC/Driver/Types.hs b/compiler/GHC/Driver/Types.hs index c2699f23e9..64e031e0f5 100644 --- a/compiler/GHC/Driver/Types.hs +++ b/compiler/GHC/Driver/Types.hs @@ -159,24 +159,24 @@ import GHC.Runtime.Eval.Types ( Resume ) import GHC.Runtime.Interpreter.Types (Interp) import GHC.ForeignSrcLang -import UniqFM +import GHC.Types.Unique.FM import GHC.Hs -import RdrName -import Avail -import Module +import GHC.Types.Name.Reader +import GHC.Types.Avail +import GHC.Types.Module import GHC.Core.InstEnv ( InstEnv, ClsInst, identicalClsInstHead ) import GHC.Core.FamInstEnv import GHC.Core ( CoreProgram, RuleBase, CoreRule ) -import Name -import NameEnv -import VarSet -import Var -import Id -import IdInfo ( IdDetails(..), RecSelParent(..)) +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Var.Set +import GHC.Types.Var +import GHC.Types.Id +import GHC.Types.Id.Info ( IdDetails(..), RecSelParent(..)) import GHC.Core.Type import ApiAnnotation ( ApiAnns ) -import Annotations ( Annotation, AnnEnv, mkAnnEnv, plusAnnEnv ) +import GHC.Types.Annotations ( Annotation, AnnEnv, mkAnnEnv, plusAnnEnv ) import GHC.Core.Class import GHC.Core.TyCon import GHC.Core.Coercion.Axiom @@ -193,13 +193,13 @@ import GHC.Driver.Phases ( Phase, HscSource(..), hscSourceString , isHsBootOrSig, isHsigFile ) import qualified GHC.Driver.Phases as Phase -import BasicTypes +import GHC.Types.Basic import GHC.Iface.Syntax import Maybes import Outputable -import SrcLoc -import Unique -import UniqDFM +import GHC.Types.SrcLoc +import GHC.Types.Unique +import GHC.Types.Unique.DFM import FastString import StringBuffer ( StringBuffer ) import Fingerprint @@ -207,10 +207,10 @@ import MonadUtils import Bag import Binary import ErrUtils -import NameCache +import GHC.Types.Name.Cache import GHC.Platform import Util -import UniqDSet +import GHC.Types.Unique.DSet import GHC.Serialized ( Serialized ) import qualified GHC.LanguageExtensions as LangExt @@ -1611,7 +1611,7 @@ The Ids bound by previous Stmts in GHCi are currently global. (b) Having an External Name is important because of Note - [GlobalRdrEnv shadowing] in RdrName + [GlobalRdrEnv shadowing] in GHC.Types.Names.RdrName (c) Their types are tidied. This is important, because :info may ask to look at them, and :info expects the things it looks up to have diff --git a/compiler/GHC/Hs.hs b/compiler/GHC/Hs.hs index 999d59ea7a..98509398aa 100644 --- a/compiler/GHC/Hs.hs +++ b/compiler/GHC/Hs.hs @@ -45,15 +45,15 @@ import GHC.Hs.Lit import GHC.Hs.Extension import GHC.Hs.Pat import GHC.Hs.Types -import BasicTypes ( Fixity, WarningTxt ) +import GHC.Types.Basic ( Fixity, WarningTxt ) import GHC.Hs.Utils import GHC.Hs.Doc import GHC.Hs.Instances () -- For Data instances -- others: import Outputable -import SrcLoc -import Module ( ModuleName ) +import GHC.Types.SrcLoc +import GHC.Types.Module ( ModuleName ) -- libraries: import Data.Data hiding ( Fixity ) diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 70da7903fc..efd4b7cd95 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -35,11 +35,11 @@ import GHC.Hs.Types import GHC.Core import TcEvidence import GHC.Core.Type -import NameSet -import BasicTypes +import GHC.Types.Name.Set +import GHC.Types.Basic import Outputable -import SrcLoc -import Var +import GHC.Types.SrcLoc as SrcLoc +import GHC.Types.Var import Bag import FastString import BooleanFormula (LBooleanFormula) @@ -992,7 +992,7 @@ data Sig pass -- For details on above see note [Api annotations] in ApiAnnotation | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass) - -- Note [Pragma source text] in BasicTypes + -- Note [Pragma source text] in GHC.Types.Basic -- | A minimal complete definition pragma -- @@ -1005,7 +1005,7 @@ data Sig pass -- For details on above see note [Api annotations] in ApiAnnotation | MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (Located (IdP pass))) - -- Note [Pragma source text] in BasicTypes + -- Note [Pragma source text] in GHC.Types.Basic -- | A "set cost centre" pragma for declarations -- @@ -1016,7 +1016,7 @@ data Sig pass -- > {-# SCC funName "cost_centre_name" #-} | SCCFunSig (XSCCFunSig pass) - SourceText -- Note [Pragma source text] in BasicTypes + SourceText -- Note [Pragma source text] in GHC.Types.Basic (Located (IdP pass)) -- Function name (Maybe (Located StringLiteral)) -- | A complete match pragma diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs index 84a9bb4dca..07cdb82a91 100644 --- a/compiler/GHC/Hs/Decls.hs +++ b/compiler/GHC/Hs/Decls.hs @@ -104,17 +104,17 @@ import GHC.Hs.Binds import GHC.Hs.Types import GHC.Hs.Doc import GHC.Core.TyCon -import BasicTypes +import GHC.Types.Basic import GHC.Core.Coercion -import ForeignCall +import GHC.Types.ForeignCall import GHC.Hs.Extension -import NameSet +import GHC.Types.Name.Set -- others: import GHC.Core.Class import Outputable import Util -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.Type import Bag @@ -438,7 +438,7 @@ Plan of attack: to ensure correct module and provenance is set These are the two places that we have to conjure up the magic derived -names. (The actual magic is in OccName.mkWorkerOcc, etc.) +names. (The actual magic is in GHC.Types.Name.Occurrence.mkWorkerOcc, etc.) Default methods ~~~~~~~~~~~~~~~ @@ -2241,7 +2241,7 @@ instance Outputable ForeignExport where -- | Located Rule Declarations type LRuleDecls pass = Located (RuleDecls pass) - -- Note [Pragma source text] in BasicTypes + -- Note [Pragma source text] in GHC.Types.Basic -- | Rule Declarations data RuleDecls pass = HsRules { rds_ext :: XCRuleDecls pass , rds_src :: SourceText @@ -2260,7 +2260,7 @@ data RuleDecl pass { rd_ext :: XHsRule pass -- ^ After renamer, free-vars from the LHS and RHS , rd_name :: Located (SourceText,RuleName) - -- ^ Note [Pragma source text] in BasicTypes + -- ^ Note [Pragma source text] in GHC.Types.Basic , rd_act :: Activation , rd_tyvs :: Maybe [LHsTyVarBndr (NoGhcTc pass)] -- ^ Forall'd type vars @@ -2387,7 +2387,7 @@ We use exported entities for things to deprecate. -- | Located Warning Declarations type LWarnDecls pass = Located (WarnDecls pass) - -- Note [Pragma source text] in BasicTypes + -- Note [Pragma source text] in GHC.Types.Basic -- | Warning pragma Declarations data WarnDecls pass = Warnings { wd_ext :: XWarnings pass , wd_src :: SourceText @@ -2437,7 +2437,7 @@ type LAnnDecl pass = Located (AnnDecl pass) -- | Annotation Declaration data AnnDecl pass = HsAnnotation (XHsAnnotation pass) - SourceText -- Note [Pragma source text] in BasicTypes + SourceText -- Note [Pragma source text] in GHC.Types.Basic (AnnProvenance (IdP pass)) (Located (HsExpr pass)) -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen', -- 'ApiAnnotation.AnnType' diff --git a/compiler/GHC/Hs/Doc.hs b/compiler/GHC/Hs/Doc.hs index 18a820fa6e..7da56b1524 100644 --- a/compiler/GHC/Hs/Doc.hs +++ b/compiler/GHC/Hs/Doc.hs @@ -28,9 +28,9 @@ import GhcPrelude import Binary import Encoding import FastFunctions -import Name +import GHC.Types.Name import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Data.ByteString (ByteString) import qualified Data.ByteString as BS diff --git a/compiler/GHC/Hs/Dump.hs b/compiler/GHC/Hs/Dump.hs index 71a951a30a..2fe8711570 100644 --- a/compiler/GHC/Hs/Dump.hs +++ b/compiler/GHC/Hs/Dump.hs @@ -19,16 +19,15 @@ import GhcPrelude import Data.Data hiding (Fixity) import Bag -import BasicTypes +import GHC.Types.Basic import FastString -import NameSet -import Name +import GHC.Types.Name.Set +import GHC.Types.Name import GHC.Core.DataCon -import SrcLoc +import GHC.Types.SrcLoc import GHC.Hs -import OccName hiding (occName) -import Var -import Module +import GHC.Types.Var +import GHC.Types.Module import Outputable import qualified Data.ByteString as B @@ -110,7 +109,7 @@ showAstData b a0 = blankLine $$ showAstData' a0 occName n = braces $ text "OccName: " - <> text (OccName.occNameString n) + <> text (occNameString n) moduleName :: ModuleName -> SDoc moduleName m = braces $ text "ModuleName: " <> ppr m diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs index 52162a09c8..c34e7eb809 100644 --- a/compiler/GHC/Hs/Expr.hs +++ b/compiler/GHC/Hs/Expr.hs @@ -38,11 +38,11 @@ import GHC.Hs.Binds -- others: import TcEvidence import GHC.Core -import Name -import NameSet -import BasicTypes +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Basic import GHC.Core.ConLike -import SrcLoc +import GHC.Types.SrcLoc import Util import Outputable import FastString @@ -675,7 +675,7 @@ type instance XXExpr GhcTc = HsWrap HsExpr -- | A pragma, written as {-# ... #-}, that may appear within an expression. data HsPragE p = HsPragSCC (XSCC p) - SourceText -- Note [Pragma source text] in BasicTypes + SourceText -- Note [Pragma source text] in GHC.Types.Basic StringLiteral -- "set cost centre" SCC pragma -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{-\# CORE'@, @@ -683,7 +683,7 @@ data HsPragE p -- For details on above see note [Api annotations] in ApiAnnotation | HsPragCore (XCoreAnn p) - SourceText -- Note [Pragma source text] in BasicTypes + SourceText -- Note [Pragma source text] in GHC.Types.Basic StringLiteral -- hdaume: core annotation -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen', @@ -698,12 +698,12 @@ data HsPragE p -- For details on above see note [Api annotations] in ApiAnnotation | HsPragTick -- A pragma introduced tick (XTickPragma p) - SourceText -- Note [Pragma source text] in BasicTypes + SourceText -- Note [Pragma source text] in GHC.Types.Basic (StringLiteral,(Int,Int),(Int,Int)) -- external span for this tick ((SourceText,SourceText),(SourceText,SourceText)) -- Source text for the four integers used in the span. - -- See note [Pragma source text] in BasicTypes + -- See note [Pragma source text] in GHC.Types.Basic | XHsPragE (XXPragE p) diff --git a/compiler/GHC/Hs/Expr.hs-boot b/compiler/GHC/Hs/Expr.hs-boot index 0fdbf773b2..87a4a2b38e 100644 --- a/compiler/GHC/Hs/Expr.hs-boot +++ b/compiler/GHC/Hs/Expr.hs-boot @@ -10,10 +10,10 @@ module GHC.Hs.Expr where -import SrcLoc ( Located ) +import GHC.Types.SrcLoc ( Located ) import Outputable ( SDoc, Outputable ) import {-# SOURCE #-} GHC.Hs.Pat ( LPat ) -import BasicTypes ( SpliceExplicitFlag(..)) +import GHC.Types.Basic ( SpliceExplicitFlag(..)) import GHC.Hs.Extension ( OutputableBndrId, GhcPass ) import Data.Kind ( Type ) diff --git a/compiler/GHC/Hs/Extension.hs b/compiler/GHC/Hs/Extension.hs index 31e6a20f5d..45753eaf47 100644 --- a/compiler/GHC/Hs/Extension.hs +++ b/compiler/GHC/Hs/Extension.hs @@ -28,11 +28,11 @@ module GHC.Hs.Extension where import GhcPrelude import Data.Data hiding ( Fixity ) -import Name -import RdrName -import Var +import GHC.Types.Name +import GHC.Types.Name.Reader +import GHC.Types.Var import Outputable -import SrcLoc (Located) +import GHC.Types.SrcLoc (Located) import Data.Kind diff --git a/compiler/GHC/Hs/ImpExp.hs b/compiler/GHC/Hs/ImpExp.hs index 58a310a0c0..aa85a98564 100644 --- a/compiler/GHC/Hs/ImpExp.hs +++ b/compiler/GHC/Hs/ImpExp.hs @@ -18,15 +18,15 @@ module GHC.Hs.ImpExp where import GhcPrelude -import Module ( ModuleName ) -import GHC.Hs.Doc ( HsDocString ) -import OccName ( HasOccName(..), isTcOcc, isSymOcc ) -import BasicTypes ( SourceText(..), StringLiteral(..), pprWithSourceText ) -import FieldLabel ( FieldLbl(..) ) +import GHC.Types.Module ( ModuleName ) +import GHC.Hs.Doc ( HsDocString ) +import GHC.Types.Name.Occurrence ( HasOccName(..), isTcOcc, isSymOcc ) +import GHC.Types.Basic ( SourceText(..), StringLiteral(..), pprWithSourceText ) +import GHC.Types.FieldLabel ( FieldLbl(..) ) import Outputable import FastString -import SrcLoc +import GHC.Types.SrcLoc import GHC.Hs.Extension import Data.Data @@ -80,7 +80,7 @@ data ImportDecl pass = ImportDecl { ideclExt :: XCImportDecl pass, ideclSourceSrc :: SourceText, - -- Note [Pragma source text] in BasicTypes + -- Note [Pragma source text] in GHC.Types.Basic ideclName :: Located ModuleName, -- ^ Module name. ideclPkgQual :: Maybe StringLiteral, -- ^ Package qualifier. ideclSource :: Bool, -- ^ True <=> {-\# SOURCE \#-} import @@ -282,7 +282,7 @@ gives rise to IEThingWith T [MkT] [FieldLabel "x" False x)] (without DuplicateRecordFields) IEThingWith T [MkT] [FieldLabel "x" True $sel:x:MkT)] (with DuplicateRecordFields) -See Note [Representing fields in AvailInfo] in Avail for more details. +See Note [Representing fields in AvailInfo] in GHC.Types.Avail for more details. -} ieName :: IE (GhcPass p) -> IdP (GhcPass p) diff --git a/compiler/GHC/Hs/Lit.hs b/compiler/GHC/Hs/Lit.hs index fa538f3089..a0e95c973d 100644 --- a/compiler/GHC/Hs/Lit.hs +++ b/compiler/GHC/Hs/Lit.hs @@ -22,9 +22,10 @@ module GHC.Hs.Lit where import GhcPrelude import {-# SOURCE #-} GHC.Hs.Expr( HsExpr, pprExpr ) -import BasicTypes ( IntegralLit(..),FractionalLit(..),negateIntegralLit, - negateFractionalLit,SourceText(..),pprWithSourceText, - PprPrec(..), topPrec ) +import GHC.Types.Basic + ( IntegralLit(..), FractionalLit(..), negateIntegralLit + , negateFractionalLit, SourceText(..), pprWithSourceText + , PprPrec(..), topPrec ) import GHC.Core.Type import Outputable import FastString @@ -41,7 +42,7 @@ import Data.Data hiding ( Fixity ) ************************************************************************ -} --- Note [Literal source text] in BasicTypes for SourceText fields in +-- Note [Literal source text] in GHC.Types.Basic for SourceText fields in -- the following -- Note [Trees that grow] in GHC.Hs.Extension for the Xxxxx fields in the following -- | Haskell Literal @@ -133,7 +134,7 @@ type instance XOverLit GhcTc = OverLitTc type instance XXOverLit (GhcPass _) = NoExtCon --- Note [Literal source text] in BasicTypes for SourceText fields in +-- Note [Literal source text] in GHC.Types.Basic for SourceText fields in -- the following -- | Overloaded Literal Value data OverLitVal diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs index 1bddfa2c71..f8505875bf 100644 --- a/compiler/GHC/Hs/Pat.hs +++ b/compiler/GHC/Hs/Pat.hs @@ -56,19 +56,19 @@ import GHC.Hs.Lit import GHC.Hs.Extension import GHC.Hs.Types import TcEvidence -import BasicTypes +import GHC.Types.Basic -- others: import GHC.Core.Ppr ( {- instance OutputableBndr TyVar -} ) import GHC.Driver.Session ( gopt, GeneralFlag(Opt_PrintTypecheckerElaboration) ) import TysWiredIn -import Var -import RdrName ( RdrName ) +import GHC.Types.Var +import GHC.Types.Name.Reader ( RdrName ) import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.TyCon import Outputable import GHC.Core.Type -import SrcLoc +import GHC.Types.SrcLoc import Bag -- collect ev vars from pats import Maybes -- libraries: diff --git a/compiler/GHC/Hs/Types.hs b/compiler/GHC/Hs/Types.hs index 354611836c..21f9f38abf 100644 --- a/compiler/GHC/Hs/Types.hs +++ b/compiler/GHC/Hs/Types.hs @@ -78,16 +78,16 @@ import {-# SOURCE #-} GHC.Hs.Expr ( HsSplice, pprSplice ) import GHC.Hs.Extension -import Id ( Id ) -import Name( Name, NamedThing(getName) ) -import RdrName ( RdrName ) +import GHC.Types.Id ( Id ) +import GHC.Types.Name( Name, NamedThing(getName) ) +import GHC.Types.Name.Reader ( RdrName ) import GHC.Core.DataCon( HsSrcBang(..), HsImplBang(..), SrcStrictness(..), SrcUnpackedness(..) ) import TysWiredIn( mkTupleStr ) import GHC.Core.Type import GHC.Hs.Doc -import BasicTypes -import SrcLoc +import GHC.Types.Basic +import GHC.Types.SrcLoc import Outputable import FastString import Maybes( isJust ) @@ -750,7 +750,7 @@ type instance XWildCardTy (GhcPass _) = NoExtField type instance XXType (GhcPass _) = NewHsTypeX --- Note [Literal source text] in BasicTypes for SourceText fields in +-- Note [Literal source text] in GHC.Types.Basic for SourceText fields in -- the following -- | Haskell Type Literal data HsTyLit diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs index d7f37dac86..99763d25a3 100644 --- a/compiler/GHC/Hs/Utils.hs +++ b/compiler/GHC/Hs/Utils.hs @@ -110,20 +110,20 @@ import GHC.Hs.Lit import GHC.Hs.Extension import TcEvidence -import RdrName -import Var +import GHC.Types.Name.Reader +import GHC.Types.Var import GHC.Core.TyCo.Rep import GHC.Core.Type ( appTyArgFlags, splitAppTys, tyConArgFlags, tyConAppNeedsKindSig ) import TysWiredIn ( unitTy ) import TcType import GHC.Core.DataCon import GHC.Core.ConLike -import Id -import Name -import NameSet hiding ( unitFV ) -import NameEnv -import BasicTypes -import SrcLoc +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Name.Set hiding ( unitFV ) +import GHC.Types.Name.Env +import GHC.Types.Basic +import GHC.Types.SrcLoc import FastString import Util import Bag diff --git a/compiler/GHC/HsToCore.hs b/compiler/GHC/HsToCore.hs index 145b7ade55..16d64ff5ff 100644 --- a/compiler/GHC/HsToCore.hs +++ b/compiler/GHC/HsToCore.hs @@ -27,12 +27,12 @@ import GHC.Hs import TcRnTypes import TcRnMonad ( finalSafeMode, fixSafeInstances ) import TcRnDriver ( runTcInteractive ) -import Id -import IdInfo -import Name +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Name import GHC.Core.Type import GHC.Core.TyCon ( tyConDataCons ) -import Avail +import GHC.Types.Avail import GHC.Core import GHC.Core.FVs ( exprsSomeFreeVarsList ) import GHC.Core.SimpleOpt ( simpleOptPgm, simpleOptExpr ) @@ -49,18 +49,18 @@ import GHC.Core.Coercion import TysWiredIn import GHC.Core.DataCon ( dataConWrapId ) import GHC.Core.Make -import Module -import NameSet -import NameEnv +import GHC.Types.Module +import GHC.Types.Name.Set +import GHC.Types.Name.Env import GHC.Core.Rules -import BasicTypes +import GHC.Types.Basic import GHC.Core.Op.Monad ( CoreToDo(..) ) import GHC.Core.Lint ( endPassIO ) -import VarSet +import GHC.Types.Var.Set import FastString import ErrUtils import Outputable -import SrcLoc +import GHC.Types.SrcLoc import GHC.HsToCore.Coverage import Util import MonadUtils @@ -560,7 +560,7 @@ Note [Patching magic definitions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We sometimes need to have access to defined Ids in pure contexts. Usually, we simply "wire in" these entities, as we do for types in TysWiredIn and for Ids -in MkId. See Note [Wired-in Ids] in MkId. +in GHC.Types.Id.Make. See Note [Wired-in Ids] in GHC.Types.Id.Make. However, it is sometimes *much* easier to define entities in Haskell, even if we need pure access; note that wiring-in an Id requires all diff --git a/compiler/GHC/HsToCore/Arrows.hs b/compiler/GHC/HsToCore/Arrows.hs index 27502bfda4..4d1dab9dc4 100644 --- a/compiler/GHC/HsToCore/Arrows.hs +++ b/compiler/GHC/HsToCore/Arrows.hs @@ -45,18 +45,18 @@ import GHC.Core.Utils import GHC.Core.Make import GHC.HsToCore.Binds (dsHsWrapper) -import Id +import GHC.Types.Id import GHC.Core.ConLike import TysWiredIn -import BasicTypes +import GHC.Types.Basic import PrelNames import Outputable -import VarSet -import SrcLoc +import GHC.Types.Var.Set +import GHC.Types.SrcLoc import ListSetOps( assocMaybe ) import Data.List import Util -import UniqDSet +import GHC.Types.Unique.DSet data DsCmdEnv = DsCmdEnv { arr_id, compose_id, first_id, app_id, choice_id, loop_id :: CoreExpr diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs index 3becf64ca4..8dd04c5095 100644 --- a/compiler/GHC/HsToCore/Binds.hs +++ b/compiler/GHC/HsToCore/Binds.hs @@ -54,24 +54,24 @@ import TcType import GHC.Core.Type import GHC.Core.Coercion import TysWiredIn ( typeNatKind, typeSymbolKind ) -import Id -import MkId(proxyHashId) -import Name -import VarSet +import GHC.Types.Id +import GHC.Types.Id.Make(proxyHashId) +import GHC.Types.Name +import GHC.Types.Var.Set import GHC.Core.Rules -import VarEnv -import Var( EvVar ) +import GHC.Types.Var.Env +import GHC.Types.Var( EvVar ) import Outputable -import Module -import SrcLoc +import GHC.Types.Module +import GHC.Types.SrcLoc import Maybes import OrdList import Bag -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import FastString import Util -import UniqSet( nonDetEltsUniqSet ) +import GHC.Types.Unique.Set( nonDetEltsUniqSet ) import MonadUtils import qualified GHC.LanguageExtensions as LangExt import Control.Monad diff --git a/compiler/GHC/HsToCore/Coverage.hs b/compiler/GHC/HsToCore/Coverage.hs index 7bb1886bff..ba15a8b8e6 100644 --- a/compiler/GHC/HsToCore/Coverage.hs +++ b/compiler/GHC/HsToCore/Coverage.hs @@ -21,26 +21,26 @@ import GHC.ByteCode.Types import GHC.Stack.CCS import GHC.Core.Type import GHC.Hs -import Module +import GHC.Types.Module as Module import Outputable import GHC.Driver.Session import GHC.Core.ConLike import Control.Monad -import SrcLoc +import GHC.Types.SrcLoc import ErrUtils -import NameSet hiding (FreeVars) -import Name +import GHC.Types.Name.Set hiding (FreeVars) +import GHC.Types.Name import Bag -import CostCentre -import CostCentreState +import GHC.Types.CostCentre +import GHC.Types.CostCentre.State import GHC.Core -import Id -import VarSet +import GHC.Types.Id +import GHC.Types.Var.Set import Data.List import FastString import GHC.Driver.Types import GHC.Core.TyCon -import BasicTypes +import GHC.Types.Basic import MonadUtils import Maybes import GHC.Cmm.CLabel diff --git a/compiler/GHC/HsToCore/Docs.hs b/compiler/GHC/HsToCore/Docs.hs index a34beae019..24dba94f7a 100644 --- a/compiler/GHC/HsToCore/Docs.hs +++ b/compiler/GHC/HsToCore/Docs.hs @@ -16,9 +16,9 @@ import GHC.Hs.Decls import GHC.Hs.Extension import GHC.Hs.Types import GHC.Hs.Utils -import Name -import NameSet -import SrcLoc +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.SrcLoc import TcRnTypes import Control.Applicative diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index 147da687d0..7f29491ceb 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -33,8 +33,8 @@ import GHC.HsToCore.Utils import GHC.HsToCore.Arrows import GHC.HsToCore.Monad import GHC.HsToCore.PmCheck ( checkGuardMatches ) -import Name -import NameEnv +import GHC.Types.Name +import GHC.Types.Name.Env import GHC.Core.FamInstEnv( topNormaliseType ) import GHC.HsToCore.Quote import GHC.Hs @@ -50,19 +50,19 @@ import GHC.Core.Utils import GHC.Core.Make import GHC.Driver.Session -import CostCentre -import Id -import MkId -import Module +import GHC.Types.CostCentre +import GHC.Types.Id +import GHC.Types.Id.Make +import GHC.Types.Module import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.TyCo.Ppr( pprWithTYPE ) import TysWiredIn import PrelNames -import BasicTypes +import GHC.Types.Basic import Maybes -import VarEnv -import SrcLoc +import GHC.Types.Var.Env +import GHC.Types.SrcLoc import Util import Bag import Outputable diff --git a/compiler/GHC/HsToCore/Foreign/Call.hs b/compiler/GHC/HsToCore/Foreign/Call.hs index 2abce51649..5cbf22f92a 100644 --- a/compiler/GHC/HsToCore/Foreign/Call.hs +++ b/compiler/GHC/HsToCore/Foreign/Call.hs @@ -30,21 +30,21 @@ import GHC.Core import GHC.HsToCore.Monad import GHC.Core.Utils import GHC.Core.Make -import MkId -import ForeignCall +import GHC.Types.Id.Make +import GHC.Types.ForeignCall import GHC.Core.DataCon import GHC.HsToCore.Utils import TcType import GHC.Core.Type -import Id ( Id ) +import GHC.Types.Id ( Id ) import GHC.Core.Coercion import PrimOp import TysPrim import GHC.Core.TyCon import TysWiredIn -import BasicTypes -import Literal +import GHC.Types.Basic +import GHC.Types.Literal import PrelNames import GHC.Driver.Session import Outputable diff --git a/compiler/GHC/HsToCore/Foreign/Decl.hs b/compiler/GHC/HsToCore/Foreign/Decl.hs index 222bcc042d..8b6d9a3974 100644 --- a/compiler/GHC/HsToCore/Foreign/Decl.hs +++ b/compiler/GHC/HsToCore/Foreign/Decl.hs @@ -28,10 +28,10 @@ import GHC.HsToCore.Monad import GHC.Hs import GHC.Core.DataCon import GHC.Core.Unfold -import Id -import Literal -import Module -import Name +import GHC.Types.Id +import GHC.Types.Literal +import GHC.Types.Module +import GHC.Types.Name import GHC.Core.Type import GHC.Types.RepType import GHC.Core.TyCon @@ -42,12 +42,12 @@ import TcType import GHC.Cmm.Expr import GHC.Cmm.Utils import GHC.Driver.Types -import ForeignCall +import GHC.Types.ForeignCall import TysWiredIn import TysPrim import PrelNames -import BasicTypes -import SrcLoc +import GHC.Types.Basic +import GHC.Types.SrcLoc import Outputable import FastString import GHC.Driver.Session diff --git a/compiler/GHC/HsToCore/GuardedRHSs.hs b/compiler/GHC/HsToCore/GuardedRHSs.hs index 49beaf1da4..6a8bc53313 100644 --- a/compiler/GHC/HsToCore/GuardedRHSs.hs +++ b/compiler/GHC/HsToCore/GuardedRHSs.hs @@ -28,7 +28,7 @@ import GHC.HsToCore.Utils import GHC.HsToCore.PmCheck.Types ( Deltas, initDeltas ) import GHC.Core.Type ( Type ) import Util -import SrcLoc +import GHC.Types.SrcLoc import Outputable import Control.Monad ( zipWithM ) import Data.List.NonEmpty ( NonEmpty, toList ) diff --git a/compiler/GHC/HsToCore/ListComp.hs b/compiler/GHC/HsToCore/ListComp.hs index 1259780573..c67f1cbf64 100644 --- a/compiler/GHC/HsToCore/ListComp.hs +++ b/compiler/GHC/HsToCore/ListComp.hs @@ -28,12 +28,12 @@ import GHC.HsToCore.Utils import GHC.Driver.Session import GHC.Core.Utils -import Id +import GHC.Types.Id import GHC.Core.Type import TysWiredIn import GHC.HsToCore.Match import PrelNames -import SrcLoc +import GHC.Types.SrcLoc import Outputable import TcType import ListSetOps( getNth ) diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs index 657946ffcb..dd29a08d3e 100644 --- a/compiler/GHC/HsToCore/Match.hs +++ b/compiler/GHC/HsToCore/Match.hs @@ -28,7 +28,7 @@ import GHC.Platform import {-#SOURCE#-} GHC.HsToCore.Expr (dsLExpr, dsSyntaxExpr) -import BasicTypes ( Origin(..) ) +import GHC.Types.Basic ( Origin(..) ) import GHC.Driver.Session import GHC.Hs import TcHsSyn @@ -36,14 +36,14 @@ import TcEvidence import TcRnMonad import GHC.HsToCore.PmCheck import GHC.Core -import Literal +import GHC.Types.Literal import GHC.Core.Utils import GHC.Core.Make import GHC.HsToCore.Monad import GHC.HsToCore.Binds import GHC.HsToCore.GuardedRHSs import GHC.HsToCore.Utils -import Id +import GHC.Types.Id import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.PatSyn @@ -53,15 +53,15 @@ import GHC.Core.Type import GHC.Core.Coercion ( eqCoercion ) import GHC.Core.TyCon ( isNewTyCon ) import TysWiredIn -import SrcLoc +import GHC.Types.SrcLoc import Maybes import Util -import Name +import GHC.Types.Name import Outputable -import BasicTypes ( isGenerated, il_value, fl_value ) +import GHC.Types.Basic ( isGenerated, il_value, fl_value ) import FastString -import Unique -import UniqDFM +import GHC.Types.Unique +import GHC.Types.Unique.DFM import Control.Monad( unless ) import Data.List.NonEmpty (NonEmpty(..)) diff --git a/compiler/GHC/HsToCore/Match.hs-boot b/compiler/GHC/HsToCore/Match.hs-boot index 6dd7729935..f1381707c8 100644 --- a/compiler/GHC/HsToCore/Match.hs-boot +++ b/compiler/GHC/HsToCore/Match.hs-boot @@ -1,10 +1,10 @@ module GHC.HsToCore.Match where import GhcPrelude -import Var ( Id ) +import GHC.Types.Var ( Id ) import TcType ( Type ) -import GHC.HsToCore.Monad ( DsM, EquationInfo, MatchResult ) -import GHC.Core ( CoreExpr ) +import GHC.HsToCore.Monad ( DsM, EquationInfo, MatchResult ) +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 cae2dababd..f46780aee2 100644 --- a/compiler/GHC/HsToCore/Match/Constructor.hs +++ b/compiler/GHC/HsToCore/Match/Constructor.hs @@ -23,16 +23,16 @@ import {-# SOURCE #-} GHC.HsToCore.Match ( match ) import GHC.Hs import GHC.HsToCore.Binds import GHC.Core.ConLike -import BasicTypes ( Origin(..) ) +import GHC.Types.Basic ( Origin(..) ) import TcType import GHC.HsToCore.Monad import GHC.HsToCore.Utils import GHC.Core.Make ( mkCoreLets ) import Util -import Id -import NameEnv -import FieldLabel ( flSelector ) -import SrcLoc +import GHC.Types.Id +import GHC.Types.Name.Env +import GHC.Types.FieldLabel ( flSelector ) +import GHC.Types.SrcLoc import Outputable import Control.Monad(liftM) import Data.List (groupBy) diff --git a/compiler/GHC/HsToCore/Match/Literal.hs b/compiler/GHC/HsToCore/Match/Literal.hs index 5a5ef53655..4946c7b2ad 100644 --- a/compiler/GHC/HsToCore/Match/Literal.hs +++ b/compiler/GHC/HsToCore/Match/Literal.hs @@ -34,23 +34,23 @@ import GHC.HsToCore.Utils import GHC.Hs -import Id +import GHC.Types.Id import GHC.Core import GHC.Core.Make import GHC.Core.TyCon import GHC.Core.DataCon import TcHsSyn ( shortCutLit ) import TcType -import Name +import GHC.Types.Name import GHC.Core.Type import PrelNames import TysWiredIn import TysPrim -import Literal -import SrcLoc +import GHC.Types.Literal +import GHC.Types.SrcLoc import Data.Ratio import Outputable -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import Util import FastString diff --git a/compiler/GHC/HsToCore/Monad.hs b/compiler/GHC/HsToCore/Monad.hs index bded17de2f..cd271b3abf 100644 --- a/compiler/GHC/HsToCore/Monad.hs +++ b/compiler/GHC/HsToCore/Monad.hs @@ -63,28 +63,28 @@ import GHC.Hs import GHC.IfaceToCore import TcMType ( checkForLevPolyX, formatLevPolyErr ) import PrelNames -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import Bag -import BasicTypes ( Origin ) +import GHC.Types.Basic ( Origin ) import GHC.Core.DataCon import GHC.Core.ConLike import GHC.Core.TyCon import GHC.HsToCore.PmCheck.Types -import Id -import Module +import GHC.Types.Id +import GHC.Types.Module import Outputable -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.Type -import UniqSupply -import Name -import NameEnv +import GHC.Types.Unique.Supply +import GHC.Types.Name +import GHC.Types.Name.Env import GHC.Driver.Session import ErrUtils import FastString -import UniqFM ( lookupWithDefaultUFM ) -import Literal ( mkLitString ) -import CostCentreState +import GHC.Types.Unique.FM ( lookupWithDefaultUFM ) +import GHC.Types.Literal ( mkLitString ) +import GHC.Types.CostCentre.State import Data.IORef diff --git a/compiler/GHC/HsToCore/PmCheck.hs b/compiler/GHC/HsToCore/PmCheck.hs index ee1c0d8062..327b0525b0 100644 --- a/compiler/GHC/HsToCore/PmCheck.hs +++ b/compiler/GHC/HsToCore/PmCheck.hs @@ -27,23 +27,23 @@ import GhcPrelude import GHC.HsToCore.PmCheck.Types import GHC.HsToCore.PmCheck.Oracle import GHC.HsToCore.PmCheck.Ppr -import BasicTypes (Origin, isGenerated) +import GHC.Types.Basic (Origin, isGenerated) import GHC.Core (CoreExpr, Expr(Var,App)) import FastString (unpackFS, lengthFS) import GHC.Driver.Session import GHC.Hs import TcHsSyn ( shortCutLit ) -import Id +import GHC.Types.Id import GHC.Core.ConLike -import Name +import GHC.Types.Name import FamInst import TysWiredIn -import SrcLoc +import GHC.Types.SrcLoc import Util import Outputable import GHC.Core.DataCon import GHC.Core.TyCon -import Var (EvVar) +import GHC.Types.Var (EvVar) import GHC.Core.Coercion import TcEvidence ( HsWrapper(..), isIdHsWrapper ) import TcType (evVarPred) diff --git a/compiler/GHC/HsToCore/PmCheck/Oracle.hs b/compiler/GHC/HsToCore/PmCheck/Oracle.hs index 3c7884d7a0..67d10628dc 100644 --- a/compiler/GHC/HsToCore/PmCheck/Oracle.hs +++ b/compiler/GHC/HsToCore/PmCheck/Oracle.hs @@ -34,23 +34,23 @@ import Outputable import ErrUtils import Util import Bag -import UniqSet -import UniqDSet -import Unique -import Id -import VarEnv -import UniqDFM -import Var (EvVar) -import Name +import GHC.Types.Unique.Set +import GHC.Types.Unique.DSet +import GHC.Types.Unique +import GHC.Types.Id +import GHC.Types.Var.Env +import GHC.Types.Unique.DFM +import GHC.Types.Var (EvVar) +import GHC.Types.Name 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 GHC.Types.Unique.Supply import FastString -import SrcLoc +import GHC.Types.SrcLoc import Maybes import GHC.Core.ConLike import GHC.Core.DataCon diff --git a/compiler/GHC/HsToCore/PmCheck/Ppr.hs b/compiler/GHC/HsToCore/PmCheck/Ppr.hs index 7ea416bde9..2f62b5e9be 100644 --- a/compiler/GHC/HsToCore/PmCheck/Ppr.hs +++ b/compiler/GHC/HsToCore/PmCheck/Ppr.hs @@ -12,10 +12,10 @@ module GHC.HsToCore.PmCheck.Ppr ( import GhcPrelude -import BasicTypes -import Id -import VarEnv -import UniqDFM +import GHC.Types.Basic +import GHC.Types.Id +import GHC.Types.Var.Env +import GHC.Types.Unique.DFM import GHC.Core.ConLike import GHC.Core.DataCon import TysWiredIn diff --git a/compiler/GHC/HsToCore/PmCheck/Types.hs b/compiler/GHC/HsToCore/PmCheck/Types.hs index 08f31c9f13..75652ac2b6 100644 --- a/compiler/GHC/HsToCore/PmCheck/Types.hs +++ b/compiler/GHC/HsToCore/PmCheck/Types.hs @@ -44,12 +44,12 @@ import GhcPrelude import Util import Bag import FastString -import Var (EvVar) -import Id -import VarEnv -import UniqDSet -import UniqDFM -import Name +import GHC.Types.Var (EvVar) +import GHC.Types.Id +import GHC.Types.Var.Env +import GHC.Types.Unique.DSet +import GHC.Types.Unique.DFM +import GHC.Types.Name import GHC.Core.DataCon import GHC.Core.ConLike import Outputable @@ -57,7 +57,7 @@ import ListSetOps (unionLists) import Maybes import GHC.Core.Type import GHC.Core.TyCon -import Literal +import GHC.Types.Literal import GHC.Core import GHC.Core.Map import GHC.Core.Utils (exprType) diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs index 06ea9e307f..4de99748e5 100644 --- a/compiler/GHC/HsToCore/Quote.hs +++ b/compiler/GHC/HsToCore/Quote.hs @@ -38,31 +38,26 @@ import qualified Language.Haskell.TH as TH import GHC.Hs import PrelNames --- To avoid clashes with GHC.HsToCore.Quote.varName we must make a local alias --- for OccName.varName. We do this by removing varName from the import of OccName --- above, making a qualified instance of OccName and using OccNameAlias.varName --- where varName ws previously used in this file. -import qualified OccName( isDataOcc, isVarOcc, isTcOcc ) - -import Module -import Id -import Name hiding( isVarOcc, isTcOcc, varName, tcName ) + +import GHC.Types.Module +import GHC.Types.Id +import GHC.Types.Name hiding( varName, tcName ) import THNames -import NameEnv +import GHC.Types.Name.Env import TcType import GHC.Core.TyCon import TysWiredIn import GHC.Core import GHC.Core.Make import GHC.Core.Utils -import SrcLoc -import Unique -import BasicTypes +import GHC.Types.SrcLoc as SrcLoc +import GHC.Types.Unique +import GHC.Types.Basic import Outputable import Bag import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import Util import Maybes import MonadUtils @@ -72,7 +67,7 @@ import Control.Monad.Trans.Class import GHC.Core.Class import GHC.Driver.Types ( MonadThings ) import GHC.Core.DataCon -import Var +import GHC.Types.Var import GHC.HsToCore.Binds import GHC.TypeLits @@ -2105,10 +2100,10 @@ globalVar name name_mod = moduleNameString (moduleName mod) name_pkg = unitIdString (moduleUnitId mod) name_occ = nameOccName name - mk_varg | OccName.isDataOcc name_occ = mkNameG_dName - | OccName.isVarOcc name_occ = mkNameG_vName - | OccName.isTcOcc name_occ = mkNameG_tcName - | otherwise = pprPanic "GHC.HsToCore.Quote.globalVar" (ppr name) + mk_varg | isDataOcc name_occ = mkNameG_dName + | isVarOcc name_occ = mkNameG_vName + | isTcOcc name_occ = mkNameG_tcName + | otherwise = pprPanic "GHC.HsToCore.Quote.globalVar" (ppr name) lookupType :: Name -- Name of type constructor (e.g. (M TH.Exp)) -> MetaM Type -- The type diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs index 1eb6079c1e..26e708dded 100644 --- a/compiler/GHC/HsToCore/Usage.hs +++ b/compiler/GHC/HsToCore/Usage.hs @@ -17,13 +17,13 @@ import GHC.Driver.Session import GHC.Driver.Ways import GHC.Driver.Types import TcRnTypes -import Name -import NameSet -import Module +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Module import Outputable import Util -import UniqSet -import UniqFM +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM import Fingerprint import Maybes import GHC.Driver.Packages diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs index 0b80959f09..f7889e01ae 100644 --- a/compiler/GHC/HsToCore/Utils.hs +++ b/compiler/GHC/HsToCore/Utils.hs @@ -57,9 +57,9 @@ import GHC.HsToCore.Monad import GHC.Core.Utils import GHC.Core.Make -import MkId -import Id -import Literal +import GHC.Types.Id.Make +import GHC.Types.Id +import GHC.Types.Literal import GHC.Core.TyCon import GHC.Core.DataCon import GHC.Core.PatSyn @@ -67,15 +67,15 @@ import GHC.Core.Type import GHC.Core.Coercion import TysPrim import TysWiredIn -import BasicTypes +import GHC.Types.Basic import GHC.Core.ConLike -import UniqSet -import UniqSupply -import Module +import GHC.Types.Unique.Set +import GHC.Types.Unique.Supply +import GHC.Types.Module import PrelNames -import Name( isInternalName ) +import GHC.Types.Name( isInternalName ) import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Util import GHC.Driver.Session import FastString diff --git a/compiler/GHC/Iface/Binary.hs b/compiler/GHC/Iface/Binary.hs index c4ddfa2ece..cc8472e040 100644 --- a/compiler/GHC/Iface/Binary.hs +++ b/compiler/GHC/Iface/Binary.hs @@ -39,19 +39,19 @@ import TcRnMonad import PrelInfo ( isKnownKeyName, lookupKnownKeyName ) import GHC.Iface.Env import GHC.Driver.Types -import Module -import Name +import GHC.Types.Module +import GHC.Types.Name import GHC.Driver.Session -import UniqFM -import UniqSupply +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import Panic import Binary -import SrcLoc +import GHC.Types.SrcLoc import ErrUtils import FastMutInt -import Unique +import GHC.Types.Unique import Outputable -import NameCache +import GHC.Types.Name.Cache import GHC.Platform import FastString import Constants diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs index f7cea99b94..8b12f50345 100644 --- a/compiler/GHC/Iface/Env.hs +++ b/compiler/GHC/Iface/Env.hs @@ -27,16 +27,16 @@ import GhcPrelude import TcRnMonad import GHC.Driver.Types import GHC.Core.Type -import Var -import Name -import Avail -import Module +import GHC.Types.Var +import GHC.Types.Name +import GHC.Types.Avail +import GHC.Types.Module import FastString import FastStringEnv import GHC.Iface.Type -import NameCache -import UniqSupply -import SrcLoc +import GHC.Types.Name.Cache +import GHC.Types.Unique.Supply +import GHC.Types.SrcLoc import Outputable import Data.List ( partition ) @@ -48,7 +48,7 @@ import Data.List ( partition ) * * ********************************************************* -See Also: Note [The Name Cache] in NameCache +See Also: Note [The Name Cache] in GHC.Types.Name.Cache -} newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name diff --git a/compiler/GHC/Iface/Env.hs-boot b/compiler/GHC/Iface/Env.hs-boot index 2c326ab0ad..34d9a29960 100644 --- a/compiler/GHC/Iface/Env.hs-boot +++ b/compiler/GHC/Iface/Env.hs-boot @@ -1,9 +1,9 @@ module GHC.Iface.Env where -import Module -import OccName +import GHC.Types.Module +import GHC.Types.Name.Occurrence import TcRnMonad -import Name -import SrcLoc +import GHC.Types.Name +import GHC.Types.SrcLoc newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs index d726a15c7b..a1f9a3cf32 100644 --- a/compiler/GHC/Iface/Ext/Ast.hs +++ b/compiler/GHC/Iface/Ext/Ast.hs @@ -18,26 +18,26 @@ module GHC.Iface.Ext.Ast ( mkHieFile, mkHieFileWithSource, getCompressedAsts) wh import GhcPrelude -import Avail ( Avails ) +import GHC.Types.Avail ( Avails ) import Bag ( Bag, bagToList ) -import BasicTypes +import GHC.Types.Basic import BooleanFormula import GHC.Core.Class ( FunDep ) import GHC.Core.Utils ( exprType ) import GHC.Core.ConLike ( conLikeName ) import GHC.HsToCore ( deSugarExpr ) -import FieldLabel +import GHC.Types.FieldLabel import GHC.Hs import GHC.Driver.Types -import Module ( ModuleName, ml_hs_file ) +import GHC.Types.Module ( ModuleName, ml_hs_file ) import MonadUtils ( concatMapM, liftIO ) -import Name ( Name, nameSrcSpan, setNameLoc ) -import NameEnv ( NameEnv, emptyNameEnv, extendNameEnv, lookupNameEnv ) -import SrcLoc +import GHC.Types.Name ( Name, nameSrcSpan, setNameLoc ) +import GHC.Types.Name.Env ( NameEnv, emptyNameEnv, extendNameEnv, lookupNameEnv ) +import GHC.Types.SrcLoc import TcHsSyn ( hsLitType, hsPatType ) import GHC.Core.Type ( mkVisFunTys, Type ) import TysWiredIn ( mkListTy, mkSumTy ) -import Var ( Id, Var, setVarName, varName, varType ) +import GHC.Types.Var ( Id, Var, setVarName, varName, varType ) import TcRnTypes import GHC.Iface.Make ( mkIfaceExports ) import Panic diff --git a/compiler/GHC/Iface/Ext/Binary.hs b/compiler/GHC/Iface/Ext/Binary.hs index d89a346d9f..1a231b95f7 100644 --- a/compiler/GHC/Iface/Ext/Binary.hs +++ b/compiler/GHC/Iface/Ext/Binary.hs @@ -23,15 +23,15 @@ import Binary import GHC.Iface.Binary ( getDictFastString ) import FastMutInt import FastString ( FastString ) -import Module ( Module ) -import Name -import NameCache +import GHC.Types.Module ( Module ) +import GHC.Types.Name +import GHC.Types.Name.Cache import Outputable import PrelInfo -import SrcLoc -import UniqSupply ( takeUniqFromSupply ) -import Unique -import UniqFM +import GHC.Types.SrcLoc as SrcLoc +import GHC.Types.Unique.Supply ( takeUniqFromSupply ) +import GHC.Types.Unique +import GHC.Types.Unique.FM import Util import qualified Data.Array as A diff --git a/compiler/GHC/Iface/Ext/Debug.hs b/compiler/GHC/Iface/Ext/Debug.hs index 25cc940834..e28f7ab03d 100644 --- a/compiler/GHC/Iface/Ext/Debug.hs +++ b/compiler/GHC/Iface/Ext/Debug.hs @@ -9,15 +9,15 @@ module GHC.Iface.Ext.Debug where import GhcPrelude -import SrcLoc -import Module +import GHC.Types.SrcLoc +import GHC.Types.Module import FastString import Outputable import GHC.Iface.Ext.Types import GHC.Iface.Ext.Binary import GHC.Iface.Ext.Utils -import Name +import GHC.Types.Name import qualified Data.Map as M import qualified Data.Set as S diff --git a/compiler/GHC/Iface/Ext/Types.hs b/compiler/GHC/Iface/Ext/Types.hs index e56864bc04..3f87a91d34 100644 --- a/compiler/GHC/Iface/Ext/Types.hs +++ b/compiler/GHC/Iface/Ext/Types.hs @@ -16,11 +16,11 @@ import Config import Binary import FastString ( FastString ) import GHC.Iface.Type -import Module ( ModuleName, Module ) -import Name ( Name ) +import GHC.Types.Module ( ModuleName, Module ) +import GHC.Types.Name ( Name ) import Outputable hiding ( (<>) ) -import SrcLoc ( RealSrcSpan ) -import Avail +import GHC.Types.SrcLoc ( RealSrcSpan ) +import GHC.Types.Avail import qualified Data.Array as A import qualified Data.Map as M diff --git a/compiler/GHC/Iface/Ext/Utils.hs b/compiler/GHC/Iface/Ext/Utils.hs index 2caffe56b3..bbbe1084f1 100644 --- a/compiler/GHC/Iface/Ext/Utils.hs +++ b/compiler/GHC/Iface/Ext/Utils.hs @@ -10,15 +10,15 @@ import GHC.Core.Map import GHC.Driver.Session ( DynFlags ) import FastString ( FastString, mkFastString ) import GHC.Iface.Type -import Name hiding (varName) +import GHC.Types.Name hiding (varName) import Outputable ( renderWithStyle, ppr, defaultUserStyle, initSDocContext ) -import SrcLoc +import GHC.Types.SrcLoc import GHC.CoreToIface import GHC.Core.TyCon import GHC.Core.TyCo.Rep import GHC.Core.Type -import Var -import VarEnv +import GHC.Types.Var +import GHC.Types.Var.Env import GHC.Iface.Ext.Types diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs index 7858fc6ce4..9bc073b6a9 100644 --- a/compiler/GHC/Iface/Load.hs +++ b/compiler/GHC/Iface/Load.hs @@ -45,29 +45,29 @@ import GHC.Iface.Syntax import GHC.Iface.Env import GHC.Driver.Types -import BasicTypes hiding (SuccessFlag(..)) +import GHC.Types.Basic hiding (SuccessFlag(..)) import TcRnMonad import Constants import PrelNames import PrelInfo import PrimOp ( allThePrimOps, primOpFixity, primOpOcc ) -import MkId ( seqId ) +import GHC.Types.Id.Make ( seqId ) import TysPrim ( funTyConName ) import GHC.Core.Rules import GHC.Core.TyCon -import Annotations +import GHC.Types.Annotations import GHC.Core.InstEnv import GHC.Core.FamInstEnv -import Name -import NameEnv -import Avail -import Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Avail +import GHC.Types.Module import Maybes import ErrUtils import GHC.Driver.Finder -import UniqFM -import SrcLoc +import GHC.Types.Unique.FM +import GHC.Types.SrcLoc import Outputable import GHC.Iface.Binary import Panic @@ -75,9 +75,9 @@ import Util import FastString import Fingerprint import GHC.Driver.Hooks -import FieldLabel +import GHC.Types.FieldLabel import GHC.Iface.Rename -import UniqDSet +import GHC.Types.Unique.DSet import GHC.Driver.Plugins import Control.Monad diff --git a/compiler/GHC/Iface/Load.hs-boot b/compiler/GHC/Iface/Load.hs-boot index a2af2a1a9a..7718eb99f3 100644 --- a/compiler/GHC/Iface/Load.hs-boot +++ b/compiler/GHC/Iface/Load.hs-boot @@ -1,6 +1,6 @@ module GHC.Iface.Load where -import Module (Module) +import GHC.Types.Module (Module) import TcRnMonad (IfM) import GHC.Driver.Types (ModIface) import Outputable (SDoc) diff --git a/compiler/GHC/Iface/Make.hs b/compiler/GHC/Iface/Make.hs index f903892f9a..5cf6aa5f27 100644 --- a/compiler/GHC/Iface/Make.hs +++ b/compiler/GHC/Iface/Make.hs @@ -29,8 +29,8 @@ import GHC.Iface.Load import GHC.CoreToIface import GHC.HsToCore.Usage ( mkUsageInfo, mkUsedNames, mkDependencies ) -import Id -import Annotations +import GHC.Types.Id +import GHC.Types.Annotations import GHC.Core import GHC.Core.Class import GHC.Core.TyCon @@ -45,17 +45,17 @@ import TcRnMonad import GHC.Hs import GHC.Driver.Types import GHC.Driver.Session -import VarEnv -import Var -import Name -import Avail -import RdrName -import NameEnv -import NameSet -import Module +import GHC.Types.Var.Env +import GHC.Types.Var +import GHC.Types.Name +import GHC.Types.Avail +import GHC.Types.Name.Reader +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Module import ErrUtils import Outputable -import BasicTypes hiding ( SuccessFlag(..) ) +import GHC.Types.Basic hiding ( SuccessFlag(..) ) import Util hiding ( eqListBy ) import FastString import Maybes @@ -228,7 +228,7 @@ mkIface_ hsc_env [(occ,fix) | FixItem occ fix <- nameEnvElts fix_env] -- The order of fixities returned from nameEnvElts is not -- deterministic, so we sort by OccName to canonicalize it. - -- See Note [Deterministic UniqFM] in UniqDFM for more details. + -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for more details. warns = src_warns iface_rules = map coreRuleToIfaceRule rules iface_insts = map instanceToIfaceInst $ fixSafeInstances safe_mode insts diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs index 0890c6ffa0..12830ab20e 100644 --- a/compiler/GHC/Iface/Recomp.hs +++ b/compiler/GHC/Iface/Recomp.hs @@ -19,27 +19,27 @@ import BinFingerprint import GHC.Iface.Load import FlagChecker -import Annotations +import GHC.Types.Annotations import GHC.Core import TcRnMonad import GHC.Hs import GHC.Driver.Types import GHC.Driver.Finder import GHC.Driver.Session -import Name -import NameSet -import Module +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Module import ErrUtils import Digraph -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import Unique +import GHC.Types.Unique import Util hiding ( eqListBy ) import Maybes import Binary import Fingerprint import Exception -import UniqSet +import GHC.Types.Unique.Set import GHC.Driver.Packages import Control.Monad diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs index 83632434bd..5d084155db 100644 --- a/compiler/GHC/Iface/Rename.hs +++ b/compiler/GHC/Iface/Rename.hs @@ -19,22 +19,22 @@ module GHC.Iface.Rename ( import GhcPrelude -import SrcLoc +import GHC.Types.SrcLoc import Outputable import GHC.Driver.Types -import Module -import UniqFM -import Avail +import GHC.Types.Module +import GHC.Types.Unique.FM +import GHC.Types.Avail import GHC.Iface.Syntax -import FieldLabel -import Var +import GHC.Types.FieldLabel +import GHC.Types.Var import ErrUtils -import Name +import GHC.Types.Name import TcRnMonad import Util import Fingerprint -import BasicTypes +import GHC.Types.Basic -- a bit vexing import {-# SOURCE #-} GHC.Iface.Load diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs index 1812c34d6b..1f82ccfc7f 100644 --- a/compiler/GHC/Iface/Syntax.hs +++ b/compiler/GHC/Iface/Syntax.hs @@ -47,29 +47,29 @@ import GhcPrelude import GHC.Iface.Type import BinFingerprint import GHC.Core( IsOrphan, isOrphan ) -import Demand -import Cpr +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core.Class -import FieldLabel -import NameSet +import GHC.Types.FieldLabel +import GHC.Types.Name.Set import GHC.Core.Coercion.Axiom ( BranchIndex ) -import Name -import CostCentre -import Literal -import ForeignCall -import Annotations( AnnPayload, AnnTarget ) -import BasicTypes +import GHC.Types.Name +import GHC.Types.CostCentre +import GHC.Types.Literal +import GHC.Types.ForeignCall +import GHC.Types.Annotations( AnnPayload, AnnTarget ) +import GHC.Types.Basic import Outputable -import Module -import SrcLoc +import GHC.Types.Module +import GHC.Types.SrcLoc import Fingerprint import Binary import BooleanFormula ( BooleanFormula, pprBooleanFormula, isTrue ) -import Var( VarBndr(..), binderVar ) +import GHC.Types.Var( VarBndr(..), binderVar ) import GHC.Core.TyCon ( Role (..), Injectivity(..), tyConBndrVisArgFlag ) import Util( dropList, filterByList, notNull, unzipWith, debugIsOn ) import GHC.Core.DataCon (SrcStrictness(..), SrcUnpackedness(..)) -import Lexeme (isLexSym) +import GHC.Utils.Lexeme (isLexSym) import TysWiredIn ( constraintKindTyConName ) import Util (seqList) @@ -262,7 +262,7 @@ data IfaceConDecl ifConStricts :: [IfaceBang], -- Empty (meaning all lazy), -- or 1-1 corresp with arg tys - -- See Note [Bangs on imported data constructors] in MkId + -- See Note [Bangs on imported data constructors] in GHC.Types.Id.Make ifConSrcStricts :: [IfaceSrcBang] } -- empty meaning no src stricts type IfaceEqSpec = [(IfLclName,IfaceType)] diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs index b3fd56c4d2..6459902a52 100644 --- a/compiler/GHC/Iface/Tidy.hs +++ b/compiler/GHC/Iface/Tidy.hs @@ -31,31 +31,31 @@ import GHC.Core.PatSyn import GHC.Core.ConLike import GHC.Core.Arity ( exprArity, exprBotStrictness_maybe ) import StaticPtrTable -import VarEnv -import VarSet -import Var -import Id -import MkId ( mkDictSelRhs ) -import IdInfo +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Var +import GHC.Types.Id +import GHC.Types.Id.Make ( mkDictSelRhs ) +import GHC.Types.Id.Info import GHC.Core.InstEnv -import GHC.Core.Type ( tidyTopType ) -import Demand ( appIsBottom, isTopSig, isBottomingSig ) -import Cpr ( mkCprSig, botCpr ) -import BasicTypes -import Name hiding (varName) -import NameSet -import NameCache -import Avail +import GHC.Core.Type ( tidyTopType ) +import GHC.Types.Demand ( appIsBottom, isTopSig, isBottomingSig ) +import GHC.Types.Cpr ( mkCprSig, botCpr ) +import GHC.Types.Basic +import GHC.Types.Name hiding (varName) +import GHC.Types.Name.Set +import GHC.Types.Name.Cache +import GHC.Types.Avail import GHC.Iface.Env import TcEnv import TcRnMonad import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Class -import Module +import GHC.Types.Module import GHC.Driver.Types import Maybes -import UniqSupply +import GHC.Types.Unique.Supply import Outputable import Util( filterOut ) import qualified ErrUtils as Err @@ -581,7 +581,7 @@ getImplicitBinds tc = cls_binds ++ getTyConImplicitBinds tc getTyConImplicitBinds :: TyCon -> [CoreBind] getTyConImplicitBinds tc - | isNewTyCon tc = [] -- See Note [Compulsory newtype unfolding] in MkId + | isNewTyCon tc = [] -- See Note [Compulsory newtype unfolding] in GHC.Types.Id.Make | otherwise = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc)) getClassImplicitBinds :: Class -> [CoreBind] diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs index 8b154248ab..85b1a19f40 100644 --- a/compiler/GHC/Iface/Type.hs +++ b/compiler/GHC/Iface/Type.hs @@ -68,10 +68,10 @@ import {-# SOURCE #-} GHC.Core.Type ( isRuntimeRepTy ) import GHC.Core.TyCon hiding ( pprPromotionQuote ) import GHC.Core.Coercion.Axiom -import Var +import GHC.Types.Var import PrelNames -import Name -import BasicTypes +import GHC.Types.Name +import GHC.Types.Basic import Binary import Outputable import FastString @@ -119,7 +119,7 @@ ifaceBndrType (IfaceTvBndr (_, t)) = t type IfaceLamBndr = (IfaceBndr, IfaceOneShot) data IfaceOneShot -- See Note [Preserve OneShotInfo] in CoreTicy - = IfaceNoOneShot -- and Note [The oneShot function] in MkId + = IfaceNoOneShot -- and Note [The oneShot function] in GHC.Types.Id.Make | IfaceOneShot diff --git a/compiler/GHC/Iface/Type.hs-boot b/compiler/GHC/Iface/Type.hs-boot index 30a0033c86..3876cb0618 100644 --- a/compiler/GHC/Iface/Type.hs-boot +++ b/compiler/GHC/Iface/Type.hs-boot @@ -4,7 +4,7 @@ module GHC.Iface.Type ) where -import Var (VarBndr, ArgFlag) +import GHC.Types.Var (VarBndr, ArgFlag) data IfaceAppArgs diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs index df2457cd62..0024d92037 100644 --- a/compiler/GHC/IfaceToCore.hs +++ b/compiler/GHC/IfaceToCore.hs @@ -39,7 +39,7 @@ import GHC.Core.Coercion.Axiom import GHC.Core.TyCo.Rep -- needs to build types & coercions in a knot import GHC.Core.TyCo.Subst ( substTyCoVars ) import GHC.Driver.Types -import Annotations +import GHC.Types.Annotations import GHC.Core.InstEnv import GHC.Core.FamInstEnv import GHC.Core @@ -47,33 +47,33 @@ import GHC.Core.Utils import GHC.Core.Unfold import GHC.Core.Lint import GHC.Core.Make -import Id -import MkId -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Make +import GHC.Types.Id.Info import GHC.Core.Class import GHC.Core.TyCon import GHC.Core.ConLike import GHC.Core.DataCon import PrelNames import TysWiredIn -import Literal -import Var -import VarSet -import Name -import NameEnv -import NameSet +import GHC.Types.Literal +import GHC.Types.Var as Var +import GHC.Types.Var.Set +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set import GHC.Core.Op.OccurAnal ( occurAnalyseExpr ) -import Demand -import Module -import UniqFM -import UniqSupply +import GHC.Types.Demand +import GHC.Types.Module +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import Outputable import Maybes -import SrcLoc +import GHC.Types.SrcLoc import GHC.Driver.Session import Util import FastString -import BasicTypes hiding ( SuccessFlag(..) ) +import GHC.Types.Basic hiding ( SuccessFlag(..) ) import ListSetOps import GHC.Fingerprint import qualified BooleanFormula as BF @@ -963,7 +963,7 @@ tcIfaceDataCons tycon_name tycon tc_tybinders if_cons -- decisions) to buildDataCon; it'll use -- these to guide the construction of a -- worker. - -- See Note [Bangs on imported data constructors] in MkId + -- See Note [Bangs on imported data constructors] in GHC.Types.Id.Make lbl_names univ_tvs ex_tvs user_tv_bndrs eq_spec theta @@ -1384,13 +1384,13 @@ tcIfaceTickish (IfaceSource src name) = return (SourceNote src name) tcIfaceLit :: Literal -> IfL Literal -- Integer literals deserialise to (LitInteger i <error thunk>) -- so tcIfaceLit just fills in the type. --- See Note [Integer literals] in Literal +-- See Note [Integer literals] in GHC.Types.Literal tcIfaceLit (LitNumber LitNumInteger i _) = do t <- tcIfaceTyConByName integerTyConName return (mkLitInteger i (mkTyConTy t)) -- Natural literals deserialise to (LitNatural i <error thunk>) -- so tcIfaceLit just fills in the type. --- See Note [Natural literals] in Literal +-- See Note [Natural literals] in GHC.Types.Literal tcIfaceLit (LitNumber LitNumNatural i _) = do t <- tcIfaceTyConByName naturalTyConName return (mkLitNatural i (mkTyConTy t)) diff --git a/compiler/GHC/IfaceToCore.hs-boot b/compiler/GHC/IfaceToCore.hs-boot index 32e13c80d1..b1e08e2e01 100644 --- a/compiler/GHC/IfaceToCore.hs-boot +++ b/compiler/GHC/IfaceToCore.hs-boot @@ -9,7 +9,7 @@ import GHC.Core.InstEnv ( ClsInst ) import GHC.Core.FamInstEnv ( FamInst ) import GHC.Core ( CoreRule ) import GHC.Driver.Types ( CompleteMatch ) -import Annotations ( Annotation ) +import GHC.Types.Annotations ( Annotation ) tcIfaceDecl :: Bool -> IfaceDecl -> IfL TyThing tcIfaceRules :: Bool -> [IfaceRule] -> IfL [CoreRule] diff --git a/compiler/GHC/Llvm/Ppr.hs b/compiler/GHC/Llvm/Ppr.hs index b7c3564240..4645c89e1a 100644 --- a/compiler/GHC/Llvm/Ppr.hs +++ b/compiler/GHC/Llvm/Ppr.hs @@ -34,7 +34,7 @@ import GHC.Platform import Data.List ( intersperse ) import Outputable -import Unique +import GHC.Types.Unique import FastString ( sLit ) -------------------------------------------------------------------------------- diff --git a/compiler/GHC/Llvm/Syntax.hs b/compiler/GHC/Llvm/Syntax.hs index d048215a0b..51324b396d 100644 --- a/compiler/GHC/Llvm/Syntax.hs +++ b/compiler/GHC/Llvm/Syntax.hs @@ -9,7 +9,7 @@ import GhcPrelude import GHC.Llvm.MetaData import GHC.Llvm.Types -import Unique +import GHC.Types.Unique -- | Block labels type LlvmBlockId = Unique diff --git a/compiler/GHC/Llvm/Types.hs b/compiler/GHC/Llvm/Types.hs index e8b4bc283a..a52e05faac 100644 --- a/compiler/GHC/Llvm/Types.hs +++ b/compiler/GHC/Llvm/Types.hs @@ -19,7 +19,7 @@ import GHC.Platform import GHC.Driver.Session import FastString import Outputable -import Unique +import GHC.Types.Unique -- from NCG import GHC.CmmToAsm.Ppr diff --git a/compiler/GHC/Platform/Reg.hs b/compiler/GHC/Platform/Reg.hs index b856d7c3af..00cd254630 100644 --- a/compiler/GHC/Platform/Reg.hs +++ b/compiler/GHC/Platform/Reg.hs @@ -29,7 +29,7 @@ where import GhcPrelude import Outputable -import Unique +import GHC.Types.Unique import GHC.Platform.Reg.Class import Data.List (intersect) diff --git a/compiler/GHC/Platform/Reg/Class.hs b/compiler/GHC/Platform/Reg/Class.hs index 225ad05be5..8aa81c2fe9 100644 --- a/compiler/GHC/Platform/Reg/Class.hs +++ b/compiler/GHC/Platform/Reg/Class.hs @@ -6,8 +6,8 @@ where import GhcPrelude -import Outputable -import Unique +import Outputable +import GHC.Types.Unique -- | The class of a register. diff --git a/compiler/GHC/Plugins.hs b/compiler/GHC/Plugins.hs index 05278f7da1..2e342100bf 100644 --- a/compiler/GHC/Plugins.hs +++ b/compiler/GHC/Plugins.hs @@ -7,39 +7,67 @@ -- -- Particularly interesting modules for plugin writers include -- "GHC.Core" and "GHC.Core.Op.Monad". -module GHC.Plugins( - module GHC.Driver.Plugins, - module RdrName, module OccName, module Name, module Var, module Id, module IdInfo, - module GHC.Core.Op.Monad, module GHC.Core, module Literal, module GHC.Core.DataCon, - module GHC.Core.Utils, module GHC.Core.Make, module GHC.Core.FVs, - module GHC.Core.Subst, module GHC.Core.Rules, module Annotations, - module GHC.Driver.Session, module GHC.Driver.Packages, - module Module, module GHC.Core.Type, module GHC.Core.TyCon, module GHC.Core.Coercion, - module TysWiredIn, module GHC.Driver.Types, module BasicTypes, - module VarSet, module VarEnv, module NameSet, module NameEnv, - module UniqSet, module UniqFM, module FiniteMap, - module Util, module GHC.Serialized, module SrcLoc, module Outputable, - module UniqSupply, module Unique, module FastString, - - -- * Getting 'Name's - thNameToGhcName - ) where +module GHC.Plugins + ( module GHC.Driver.Plugins + , module GHC.Types.Name.Reader + , module GHC.Types.Name.Occurrence + , module GHC.Types.Name + , module GHC.Types.Var + , module GHC.Types.Id + , module GHC.Types.Id.Info + , module GHC.Core.Op.Monad + , module GHC.Core + , module GHC.Types.Literal + , module GHC.Core.DataCon + , module GHC.Core.Utils + , module GHC.Core.Make + , module GHC.Core.FVs + , module GHC.Core.Subst + , module GHC.Core.Rules + , module GHC.Types.Annotations + , module GHC.Driver.Session + , module GHC.Driver.Packages + , module GHC.Types.Module + , module GHC.Core.Type + , module GHC.Core.TyCon + , module GHC.Core.Coercion + , module TysWiredIn + , module GHC.Driver.Types + , module GHC.Types.Basic + , module GHC.Types.Var.Set + , module GHC.Types.Var.Env + , module GHC.Types.Name.Set + , module GHC.Types.Name.Env + , module GHC.Types.Unique + , module GHC.Types.Unique.Set + , module GHC.Types.Unique.FM + , module FiniteMap + , module Util + , module GHC.Serialized + , module GHC.Types.SrcLoc + , module Outputable + , module GHC.Types.Unique.Supply + , module FastString + , -- * Getting 'Name's + thNameToGhcName + ) +where -- Plugin stuff itself import GHC.Driver.Plugins -- Variable naming -import RdrName -import OccName hiding ( varName {- conflicts with Var.varName -} ) -import Name hiding ( varName {- reexport from OccName, conflicts with Var.varName -} ) -import Var -import Id hiding ( lazySetIdInfo, setIdExported, setIdNotExported {- all three conflict with Var -} ) -import IdInfo +import GHC.Types.Name.Reader +import GHC.Types.Name.Occurrence hiding ( varName {- conflicts with Var.varName -} ) +import GHC.Types.Name hiding ( varName {- reexport from OccName, conflicts with Var.varName -} ) +import GHC.Types.Var +import GHC.Types.Id hiding ( lazySetIdInfo, setIdExported, setIdNotExported {- all three conflict with Var -} ) +import GHC.Types.Id.Info -- Core import GHC.Core.Op.Monad import GHC.Core -import Literal +import GHC.Types.Literal import GHC.Core.DataCon import GHC.Core.Utils import GHC.Core.Make @@ -49,14 +77,14 @@ import GHC.Core.Subst hiding( substTyVarBndr, substCoVarBndr, extendCvSubst ) -- Core "extras" import GHC.Core.Rules -import Annotations +import GHC.Types.Annotations -- Pipeline-related stuff import GHC.Driver.Session import GHC.Driver.Packages -- Important GHC types -import Module +import GHC.Types.Module import GHC.Core.Type hiding {- conflict with GHC.Core.Subst -} ( substTy, extendTvSubst, extendTvSubstList, isInScope ) import GHC.Core.Coercion hiding {- conflict with GHC.Core.Subst -} @@ -64,15 +92,15 @@ import GHC.Core.Coercion hiding {- conflict with GHC.Core.Subst -} import GHC.Core.TyCon import TysWiredIn import GHC.Driver.Types -import BasicTypes hiding ( Version {- conflicts with Packages.Version -} ) +import GHC.Types.Basic hiding ( Version {- conflicts with Packages.Version -} ) -- Collections and maps -import VarSet -import VarEnv -import NameSet -import NameEnv -import UniqSet -import UniqFM +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM -- Conflicts with UniqFM: --import LazyUniqFM import FiniteMap @@ -80,10 +108,10 @@ import FiniteMap -- Common utilities import Util import GHC.Serialized -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import UniqSupply -import Unique ( Unique, Uniquable(..) ) +import GHC.Types.Unique.Supply +import GHC.Types.Unique ( Unique, Uniquable(..) ) import FastString import Data.Maybe diff --git a/compiler/GHC/Rename/Binds.hs b/compiler/GHC/Rename/Binds.hs index e50c97d54c..d0e4392fb8 100644 --- a/compiler/GHC/Rename/Binds.hs +++ b/compiler/GHC/Rename/Binds.hs @@ -45,19 +45,19 @@ import GHC.Rename.Utils ( HsDocContext(..), mapFvRn, extendTyVarEnvFVRn , checkUnusedRecordWildcard , checkDupAndShadowedNames, bindLocalNamesFV ) import GHC.Driver.Session -import Module -import Name -import NameEnv -import NameSet -import RdrName ( RdrName, rdrNameOcc ) -import SrcLoc +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Name.Reader ( RdrName, rdrNameOcc ) +import GHC.Types.SrcLoc as SrcLoc import ListSetOps ( findDupsEq ) -import BasicTypes ( RecFlag(..), TypeOrKind(..) ) +import GHC.Types.Basic ( RecFlag(..), TypeOrKind(..) ) import Digraph ( SCC(..) ) import Bag import Util import Outputable -import UniqSet +import GHC.Types.Unique.Set import Maybes ( orElse ) import OrdList import qualified GHC.LanguageExtensions as LangExt @@ -577,7 +577,7 @@ depAnalBinds binds_w_dus sccs = depAnal (\(_, defs, _) -> defs) (\(_, _, uses) -> nonDetEltsUniqSet uses) -- It's OK to use nonDetEltsUniqSet here as explained in - -- Note [depAnal determinism] in NameEnv. + -- Note [depAnal determinism] in GHC.Types.Name.Env. (bagToList binds_w_dus) get_binds (AcyclicSCC (bind, _, _)) = (NonRecursive, unitBag bind) diff --git a/compiler/GHC/Rename/Doc.hs b/compiler/GHC/Rename/Doc.hs index 2f6a796196..2ccf2bfe8d 100644 --- a/compiler/GHC/Rename/Doc.hs +++ b/compiler/GHC/Rename/Doc.hs @@ -6,7 +6,7 @@ import GhcPrelude import TcRnTypes import GHC.Hs -import SrcLoc +import GHC.Types.SrcLoc rnMbLHsDoc :: Maybe LHsDocString -> RnM (Maybe LHsDocString) diff --git a/compiler/GHC/Rename/Env.hs b/compiler/GHC/Rename/Env.hs index a860bdb53f..5e4a5a7ba0 100644 --- a/compiler/GHC/Rename/Env.hs +++ b/compiler/GHC/Rename/Env.hs @@ -49,26 +49,26 @@ import GhcPrelude import GHC.Iface.Load ( loadInterfaceForName, loadSrcInterface_maybe ) import GHC.Iface.Env import GHC.Hs -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import TcEnv import TcRnMonad import RdrHsSyn ( filterCTuple, setRdrNameSpace ) import TysWiredIn -import Name -import NameSet -import NameEnv -import Avail -import Module +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.Avail +import GHC.Types.Module import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.TyCon import ErrUtils ( MsgDoc ) import PrelNames ( rOOT_MAIN ) -import BasicTypes ( pprWarningTxtForMsg, TopLevelFlag(..), TupleSort(..) ) -import SrcLoc +import GHC.Types.Basic ( pprWarningTxtForMsg, TopLevelFlag(..), TupleSort(..) ) +import GHC.Types.SrcLoc as SrcLoc import Outputable -import UniqSet ( uniqSetAny ) +import GHC.Types.Unique.Set ( uniqSetAny ) import Util import Maybes import GHC.Driver.Session diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs index 79df0331b3..87a98abd52 100644 --- a/compiler/GHC/Rename/Expr.hs +++ b/compiler/GHC/Rename/Expr.hs @@ -32,7 +32,7 @@ import GHC.Rename.Binds ( rnLocalBindsAndThen, rnLocalValBindsLHS, rnLocalValBin import GHC.Hs import TcEnv ( isBrackStage ) import TcRnMonad -import Module ( getModule ) +import GHC.Types.Module ( getModule ) import GHC.Rename.Env import GHC.Rename.Fixity import GHC.Rename.Utils ( HsDocContext(..), bindLocalNamesFV, checkDupNames @@ -47,17 +47,17 @@ import GHC.Rename.Pat import GHC.Driver.Session import PrelNames -import BasicTypes -import Name -import NameSet -import RdrName -import UniqSet +import GHC.Types.Basic +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Reader +import GHC.Types.Unique.Set import Data.List import Util import ListSetOps ( removeDups ) import ErrUtils import Outputable -import SrcLoc +import GHC.Types.SrcLoc import FastString import Control.Monad import TysWiredIn ( nilDataConName ) diff --git a/compiler/GHC/Rename/Expr.hs-boot b/compiler/GHC/Rename/Expr.hs-boot index 77dec1b56a..a5292471d8 100644 --- a/compiler/GHC/Rename/Expr.hs-boot +++ b/compiler/GHC/Rename/Expr.hs-boot @@ -1,9 +1,9 @@ module GHC.Rename.Expr where -import Name +import GHC.Types.Name import GHC.Hs -import NameSet ( FreeVars ) +import GHC.Types.Name.Set ( FreeVars ) import TcRnTypes -import SrcLoc ( Located ) +import GHC.Types.SrcLoc ( Located ) import Outputable ( Outputable ) rnLExpr :: LHsExpr GhcPs diff --git a/compiler/GHC/Rename/Fixity.hs b/compiler/GHC/Rename/Fixity.hs index 4c55bb3e53..cf5ca883da 100644 --- a/compiler/GHC/Rename/Fixity.hs +++ b/compiler/GHC/Rename/Fixity.hs @@ -20,15 +20,15 @@ import GhcPrelude import GHC.Iface.Load import GHC.Hs -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import TcRnMonad -import Name -import NameEnv -import Module -import BasicTypes ( Fixity(..), FixityDirection(..), minPrecedence, +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Module +import GHC.Types.Basic ( Fixity(..), FixityDirection(..), minPrecedence, defaultFixity, SourceText(..) ) -import SrcLoc +import GHC.Types.SrcLoc import Outputable import Maybes import Data.List diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs index b04260e3df..286de91a9e 100644 --- a/compiler/GHC/Rename/Names.hs +++ b/compiler/GHC/Rename/Names.hs @@ -44,23 +44,23 @@ import GHC.Rename.Utils ( warnUnusedTopBinds, mkFieldEnv ) import GHC.Iface.Load ( loadSrcInterface ) import TcRnMonad import PrelNames -import Module -import Name -import NameEnv -import NameSet -import Avail -import FieldLabel +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Avail +import GHC.Types.FieldLabel import GHC.Driver.Types -import RdrName +import GHC.Types.Name.Reader import RdrHsSyn ( setRdrNameSpace ) import Outputable import Maybes -import SrcLoc -import BasicTypes ( TopLevelFlag(..), StringLiteral(..) ) +import GHC.Types.SrcLoc as SrcLoc +import GHC.Types.Basic ( TopLevelFlag(..), StringLiteral(..) ) import Util import FastString import FastStringEnv -import Id +import GHC.Types.Id import GHC.Core.Type import GHC.Core.PatSyn import qualified GHC.LanguageExtensions as LangExt @@ -1065,7 +1065,8 @@ filterImports iface decl_spec (Just (want_hiding, L l import_items)) -- Look up the children in the sub-names of the parent let subnames = case ns of -- The tc is first in ns, [] -> [] -- if it is there at all - -- See the AvailTC Invariant in Avail.hs + -- See the AvailTC Invariant in + -- GHC.Types.Avail (n1:ns1) | n1 == name -> ns1 | otherwise -> ns case lookupChildren (map Left subnames ++ map Right subflds) rdr_ns of @@ -1350,7 +1351,7 @@ This code finds which import declarations are unused. The specification and implementation notes are here: https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/unused-imports -See also Note [Choosing the best import declaration] in RdrName +See also Note [Choosing the best import declaration] in GHC.Types.Name.Reader -} type ImportDeclUsage diff --git a/compiler/GHC/Rename/Pat.hs b/compiler/GHC/Rename/Pat.hs index 34450620f0..7b83b8702d 100644 --- a/compiler/GHC/Rename/Pat.hs +++ b/compiler/GHC/Rename/Pat.hs @@ -63,15 +63,15 @@ import GHC.Rename.Utils ( HsDocContext(..), newLocalBndrRn, bindLocalNames , checkTupSize , unknownSubordinateErr ) import GHC.Rename.Types import PrelNames -import Name -import NameSet -import RdrName -import BasicTypes +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Reader +import GHC.Types.Basic import Util import ListSetOps ( removeDups ) import Outputable -import SrcLoc -import Literal ( inCharRange ) +import GHC.Types.SrcLoc +import GHC.Types.Literal ( inCharRange ) import TysWiredIn ( nilDataCon ) import GHC.Core.DataCon import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/GHC/Rename/Source.hs b/compiler/GHC/Rename/Source.hs index 8237e32877..fabe5b817d 100644 --- a/compiler/GHC/Rename/Source.hs +++ b/compiler/GHC/Rename/Source.hs @@ -25,8 +25,8 @@ import {-# SOURCE #-} GHC.Rename.Expr( rnLExpr ) import {-# SOURCE #-} GHC.Rename.Splice ( rnSpliceDecl, rnTopSpliceDecls ) import GHC.Hs -import FieldLabel -import RdrName +import GHC.Types.FieldLabel +import GHC.Types.Name.Reader import GHC.Rename.Types import GHC.Rename.Binds import GHC.Rename.Env @@ -41,30 +41,30 @@ import GHC.Rename.Doc ( rnHsDoc, rnMbLHsDoc ) import TcAnnotations ( annCtxt ) import TcRnMonad -import ForeignCall ( CCallTarget(..) ) -import Module -import GHC.Driver.Types ( Warnings(..), plusWarns ) +import GHC.Types.ForeignCall ( CCallTarget(..) ) +import GHC.Types.Module +import GHC.Driver.Types ( Warnings(..), plusWarns ) import PrelNames ( applicativeClassName, pureAName, thenAName , monadClassName, returnMName, thenMName , semigroupClassName, sappendName , monoidClassName, mappendName ) -import Name -import NameSet -import NameEnv -import Avail +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.Avail import Outputable import Bag -import BasicTypes ( pprRuleName, TypeOrKind(..) ) +import GHC.Types.Basic ( pprRuleName, TypeOrKind(..) ) import FastString -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import GHC.Driver.Session import Util ( debugIsOn, filterOut, lengthExceeds, partitionWith ) -import GHC.Driver.Types ( HscEnv, hsc_dflags ) +import GHC.Driver.Types ( HscEnv, hsc_dflags ) import ListSetOps ( findDupsEq, removeDups, equivClasses ) import Digraph ( SCC, flattenSCC, flattenSCCs, Node(..) , stronglyConnCompFromEdgedVerticesUniq ) -import UniqSet +import GHC.Types.Unique.Set import OrdList import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/GHC/Rename/Splice.hs b/compiler/GHC/Rename/Splice.hs index 12496a9fb8..2275ca6ab8 100644 --- a/compiler/GHC/Rename/Splice.hs +++ b/compiler/GHC/Rename/Splice.hs @@ -16,10 +16,10 @@ module GHC.Rename.Splice ( import GhcPrelude -import Name -import NameSet +import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Hs -import RdrName +import GHC.Types.Name.Reader import TcRnMonad import GHC.Rename.Env @@ -27,15 +27,15 @@ import GHC.Rename.Utils ( HsDocContext(..), newLocalBndrRn ) import GHC.Rename.Unbound ( isUnboundName ) import GHC.Rename.Source ( rnSrcDecls, findSplice ) import GHC.Rename.Pat ( rnPat ) -import BasicTypes ( TopLevelFlag, isTopLevel, SourceText(..) ) +import GHC.Types.Basic ( TopLevelFlag, isTopLevel, SourceText(..) ) import Outputable -import Module -import SrcLoc +import GHC.Types.Module +import GHC.Types.SrcLoc import GHC.Rename.Types ( rnLHsType ) import Control.Monad ( unless, when ) -import {-# SOURCE #-} GHC.Rename.Expr ( rnLExpr ) +import {-# SOURCE #-} GHC.Rename.Expr ( rnLExpr ) import TcEnv ( checkWellStaged ) import THNames ( liftName ) diff --git a/compiler/GHC/Rename/Splice.hs-boot b/compiler/GHC/Rename/Splice.hs-boot index b61a866331..f14be280fc 100644 --- a/compiler/GHC/Rename/Splice.hs-boot +++ b/compiler/GHC/Rename/Splice.hs-boot @@ -3,7 +3,7 @@ module GHC.Rename.Splice where import GhcPrelude import GHC.Hs import TcRnMonad -import NameSet +import GHC.Types.Name.Set rnSpliceType :: HsSplice GhcPs -> RnM (HsType GhcRn, FreeVars) diff --git a/compiler/GHC/Rename/Types.hs b/compiler/GHC/Rename/Types.hs index d633ac6593..23e9fe0879 100644 --- a/compiler/GHC/Rename/Types.hs +++ b/compiler/GHC/Rename/Types.hs @@ -46,17 +46,17 @@ import GHC.Rename.Utils ( HsDocContext(..), withHsDocContext, mapFvRn import GHC.Rename.Fixity ( lookupFieldFixityRn, lookupFixityRn , lookupTyFixityRn ) import TcRnMonad -import RdrName +import GHC.Types.Name.Reader import PrelNames import TysPrim ( funTyConName ) -import Name -import SrcLoc -import NameSet -import FieldLabel +import GHC.Types.Name +import GHC.Types.SrcLoc +import GHC.Types.Name.Set +import GHC.Types.FieldLabel import Util import ListSetOps ( deleteBys ) -import BasicTypes ( compareFixity, funTyFixity, negateFixity +import GHC.Types.Basic ( compareFixity, funTyFixity, negateFixity , Fixity(..), FixityDirection(..), LexicalFixity(..) , TypeOrKind(..) ) import Outputable diff --git a/compiler/GHC/Rename/Unbound.hs b/compiler/GHC/Rename/Unbound.hs index 78a49d954c..957a82e81c 100644 --- a/compiler/GHC/Rename/Unbound.hs +++ b/compiler/GHC/Rename/Unbound.hs @@ -19,12 +19,12 @@ where import GhcPrelude -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import TcRnMonad -import Name -import Module -import SrcLoc +import GHC.Types.Name +import GHC.Types.Module +import GHC.Types.SrcLoc as SrcLoc import Outputable import PrelNames ( mkUnboundName, isUnboundName, getUnique) import Util @@ -33,7 +33,7 @@ import GHC.Driver.Session import FastString import Data.List import Data.Function ( on ) -import UniqDFM (udfmToList) +import GHC.Types.Unique.DFM (udfmToList) {- ************************************************************************ diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs index 45bd55b31a..32ac27d12f 100644 --- a/compiler/GHC/Rename/Utils.hs +++ b/compiler/GHC/Rename/Utils.hs @@ -36,18 +36,18 @@ where import GhcPrelude import GHC.Hs -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import TcEnv import TcRnMonad -import Name -import NameSet -import NameEnv +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env import GHC.Core.DataCon -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import Outputable import Util -import BasicTypes ( TopLevelFlag(..) ) +import GHC.Types.Basic ( TopLevelFlag(..) ) import ListSetOps ( removeDups ) import GHC.Driver.Session import FastString diff --git a/compiler/GHC/Runtime/Debugger.hs b/compiler/GHC/Runtime/Debugger.hs index 5ad6a2c6f0..50622d8fa9 100644 --- a/compiler/GHC/Runtime/Debugger.hs +++ b/compiler/GHC/Runtime/Debugger.hs @@ -23,13 +23,13 @@ import GHC.Runtime.Interpreter import GHCi.RemoteTypes import GHC.Driver.Monad import GHC.Driver.Types -import Id +import GHC.Types.Id import GHC.Iface.Syntax ( showToHeader ) import GHC.Iface.Env ( newInteractiveBinder ) -import Name -import Var hiding ( varName ) -import VarSet -import UniqSet +import GHC.Types.Name +import GHC.Types.Var hiding ( varName ) +import GHC.Types.Var.Set +import GHC.Types.Unique.Set import GHC.Core.Type import GHC import Outputable diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs index 6ef575490f..794aa30b55 100644 --- a/compiler/GHC/Runtime/Eval.hs +++ b/compiler/GHC/Runtime/Eval.hs @@ -69,27 +69,27 @@ import TcType import Constraint import TcOrigin import GHC.Core.Predicate -import Var -import Id -import Name hiding ( varName ) -import NameSet -import Avail -import RdrName -import VarEnv +import GHC.Types.Var +import GHC.Types.Id as Id +import GHC.Types.Name hiding ( varName ) +import GHC.Types.Name.Set +import GHC.Types.Avail +import GHC.Types.Name.Reader +import GHC.Types.Var.Env import GHC.ByteCode.Types import GHC.Runtime.Linker as Linker import GHC.Driver.Session import GHC.LanguageExtensions -import Unique -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Supply import MonadUtils -import Module +import GHC.Types.Module import PrelNames ( toDynName, pretendNameIsInScope ) import TysWiredIn ( isCTupleTyConName ) import Panic import Maybes import ErrUtils -import SrcLoc +import GHC.Types.SrcLoc import GHC.Runtime.Heap.Inspect import Outputable import FastString diff --git a/compiler/GHC/Runtime/Eval/Types.hs b/compiler/GHC/Runtime/Eval/Types.hs index f1e3308f70..753f776f20 100644 --- a/compiler/GHC/Runtime/Eval/Types.hs +++ b/compiler/GHC/Runtime/Eval/Types.hs @@ -16,12 +16,12 @@ import GhcPrelude import GHCi.RemoteTypes import GHCi.Message (EvalExpr, ResumeContext) -import Id -import Name -import Module -import RdrName +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Module +import GHC.Types.Name.Reader import GHC.Core.Type -import SrcLoc +import GHC.Types.SrcLoc import Exception import Data.Word diff --git a/compiler/GHC/Runtime/Heap/Inspect.hs b/compiler/GHC/Runtime/Heap/Inspect.hs index 37d9af0d8b..5f34e9d2d2 100644 --- a/compiler/GHC/Runtime/Heap/Inspect.hs +++ b/compiler/GHC/Runtime/Heap/Inspect.hs @@ -37,7 +37,7 @@ import GHC.Core.DataCon import GHC.Core.Type import GHC.Types.RepType import qualified GHC.Core.Unify as U -import Var +import GHC.Types.Var import TcRnMonad import TcType import TcMType @@ -46,13 +46,13 @@ import TcUnify import TcEnv import GHC.Core.TyCon -import Name -import OccName -import Module +import GHC.Types.Name +import GHC.Types.Name.Occurrence as OccName +import GHC.Types.Module import GHC.Iface.Env import Util -import VarSet -import BasicTypes ( Boxity(..) ) +import GHC.Types.Var.Set +import GHC.Types.Basic ( Boxity(..) ) import TysPrim import PrelNames import TysWiredIn diff --git a/compiler/GHC/Runtime/Heap/Layout.hs b/compiler/GHC/Runtime/Heap/Layout.hs index c6a159345d..c469f00cb4 100644 --- a/compiler/GHC/Runtime/Heap/Layout.hs +++ b/compiler/GHC/Runtime/Heap/Layout.hs @@ -46,7 +46,7 @@ module GHC.Runtime.Heap.Layout ( import GhcPrelude -import BasicTypes( ConTagZ ) +import GHC.Types.Basic( ConTagZ ) import GHC.Driver.Session import Outputable import GHC.Platform diff --git a/compiler/GHC/Runtime/Interpreter.hs b/compiler/GHC/Runtime/Interpreter.hs index 82f0d5ffc4..61e5297184 100644 --- a/compiler/GHC/Runtime/Interpreter.hs +++ b/compiler/GHC/Runtime/Interpreter.hs @@ -62,20 +62,20 @@ import GHCi.ResolvedBCO import GHCi.BreakArray (BreakArray) import Fingerprint import GHC.Driver.Types -import UniqFM +import GHC.Types.Unique.FM import Panic import GHC.Driver.Session import Exception -import BasicTypes +import GHC.Types.Basic import FastString import Util import GHC.Runtime.Eval.Types(BreakInfo(..)) import Outputable(brackets, ppr, showSDocUnqual) -import SrcLoc +import GHC.Types.SrcLoc import Maybes -import Module +import GHC.Types.Module import GHC.ByteCode.Types -import Unique +import GHC.Types.Unique #if defined(HAVE_INTERNAL_INTERPRETER) import GHCi.Run diff --git a/compiler/GHC/Runtime/Interpreter/Types.hs b/compiler/GHC/Runtime/Interpreter/Types.hs index 6cbf2620ee..9decf8abb2 100644 --- a/compiler/GHC/Runtime/Interpreter/Types.hs +++ b/compiler/GHC/Runtime/Interpreter/Types.hs @@ -14,7 +14,7 @@ import GhcPrelude import GHCi.RemoteTypes import GHCi.Message ( Pipe ) -import UniqFM +import GHC.Types.Unique.FM import Foreign import Control.Concurrent diff --git a/compiler/GHC/Runtime/Linker.hs b/compiler/GHC/Runtime/Linker.hs index c8b4b63a78..10f18a8525 100644 --- a/compiler/GHC/Runtime/Linker.hs +++ b/compiler/GHC/Runtime/Linker.hs @@ -44,20 +44,20 @@ import GHC.Driver.Phases import GHC.Driver.Finder import GHC.Driver.Types import GHC.Driver.Ways -import Name -import NameEnv -import Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Module import ListSetOps import GHC.Runtime.Linker.Types (DynLinker(..), LinkerUnitId, PersistentLinkerState(..)) import GHC.Driver.Session -import BasicTypes +import GHC.Types.Basic import Outputable import Panic import Util import ErrUtils -import SrcLoc +import GHC.Types.SrcLoc import qualified Maybes -import UniqDSet +import GHC.Types.Unique.DSet import FastString import GHC.Platform import SysTools diff --git a/compiler/GHC/Runtime/Linker/Types.hs b/compiler/GHC/Runtime/Linker/Types.hs index 5b2f506c6d..d8530a1460 100644 --- a/compiler/GHC/Runtime/Linker/Types.hs +++ b/compiler/GHC/Runtime/Linker/Types.hs @@ -19,13 +19,13 @@ import GhcPrelude ( FilePath, String, show ) import Data.Time ( UTCTime ) import Data.Maybe ( Maybe ) import Control.Concurrent.MVar ( MVar ) -import Module ( InstalledUnitId, Module ) -import GHC.ByteCode.Types ( ItblEnv, CompiledByteCode ) +import GHC.Types.Module ( InstalledUnitId, Module ) +import GHC.ByteCode.Types ( ItblEnv, CompiledByteCode ) import Outputable -import Var ( Id ) +import GHC.Types.Var ( Id ) import GHC.Fingerprint.Type ( Fingerprint ) -import NameEnv ( NameEnv ) -import Name ( Name ) +import GHC.Types.Name.Env ( NameEnv ) +import GHC.Types.Name ( Name ) import GHCi.RemoteTypes ( ForeignHValue ) type ClosureEnv = NameEnv (Name, ForeignHValue) diff --git a/compiler/GHC/Runtime/Loader.hs b/compiler/GHC/Runtime/Loader.hs index 44737c48ed..16c965701a 100644 --- a/compiler/GHC/Runtime/Loader.hs +++ b/compiler/GHC/Runtime/Loader.hs @@ -26,26 +26,26 @@ import GHC.Driver.Session import GHC.Runtime.Linker ( linkModule, getHValue ) import GHC.Runtime.Interpreter ( wormhole, withInterp ) import GHC.Runtime.Interpreter.Types -import SrcLoc ( noSrcSpan ) -import GHC.Driver.Finder( findPluginModule, cannotFindModule ) -import TcRnMonad ( initTcInteractive, initIfaceTcRn ) -import GHC.Iface.Load ( loadPluginInterface ) -import RdrName ( RdrName, ImportSpec(..), ImpDeclSpec(..) - , ImpItemSpec(..), mkGlobalRdrEnv, lookupGRE_RdrName - , gre_name, mkRdrQual ) -import OccName ( OccName, mkVarOcc ) +import GHC.Types.SrcLoc ( noSrcSpan ) +import GHC.Driver.Finder ( findPluginModule, cannotFindModule ) +import TcRnMonad ( initTcInteractive, initIfaceTcRn ) +import GHC.Iface.Load ( loadPluginInterface ) +import GHC.Types.Name.Reader ( RdrName, ImportSpec(..), ImpDeclSpec(..) + , ImpItemSpec(..), mkGlobalRdrEnv, lookupGRE_RdrName + , gre_name, mkRdrQual ) +import GHC.Types.Name.Occurrence ( OccName, mkVarOcc ) import GHC.Rename.Names ( gresFromAvails ) import GHC.Driver.Plugins import PrelNames ( pluginTyConName, frontendPluginTyConName ) import GHC.Driver.Types -import GHCi.RemoteTypes ( HValue ) +import GHCi.RemoteTypes ( HValue ) import GHC.Core.Type ( Type, eqType, mkTyConTy ) import GHC.Core.TyCo.Ppr ( pprTyThingCategory ) import GHC.Core.TyCon ( TyCon ) -import Name ( Name, nameModule_maybe ) -import Id ( idType ) -import Module ( Module, ModuleName ) +import GHC.Types.Name ( Name, nameModule_maybe ) +import GHC.Types.Id ( idType ) +import GHC.Types.Module ( Module, ModuleName ) import Panic import FastString import ErrUtils diff --git a/compiler/GHC/Stg/CSE.hs b/compiler/GHC/Stg/CSE.hs index ea9c8e61fa..538556c6af 100644 --- a/compiler/GHC/Stg/CSE.hs +++ b/compiler/GHC/Stg/CSE.hs @@ -89,15 +89,15 @@ module GHC.Stg.CSE (stgCse) where import GhcPrelude import GHC.Core.DataCon -import Id +import GHC.Types.Id import GHC.Stg.Syntax import Outputable -import VarEnv +import GHC.Types.Var.Env import GHC.Core (AltCon(..)) import Data.List (mapAccumL) import Data.Maybe (fromMaybe) import GHC.Core.Map -import NameEnv +import GHC.Types.Name.Env import Control.Monad( (>=>) ) -------------- diff --git a/compiler/GHC/Stg/DepAnal.hs b/compiler/GHC/Stg/DepAnal.hs index 5729128126..90eec24f74 100644 --- a/compiler/GHC/Stg/DepAnal.hs +++ b/compiler/GHC/Stg/DepAnal.hs @@ -5,13 +5,13 @@ module GHC.Stg.DepAnal (depSortStgPgm) where import GhcPrelude import GHC.Stg.Syntax -import Id -import Name (Name, nameIsLocalOrFrom) -import NameEnv +import GHC.Types.Id +import GHC.Types.Name (Name, nameIsLocalOrFrom) +import GHC.Types.Name.Env import Outputable -import UniqSet (nonDetEltsUniqSet) -import VarSet -import Module (Module) +import GHC.Types.Unique.Set (nonDetEltsUniqSet) +import GHC.Types.Var.Set +import GHC.Types.Module (Module) import Data.Graph (SCC (..)) diff --git a/compiler/GHC/Stg/FVs.hs b/compiler/GHC/Stg/FVs.hs index 6bd219d7a3..e323775c5f 100644 --- a/compiler/GHC/Stg/FVs.hs +++ b/compiler/GHC/Stg/FVs.hs @@ -45,8 +45,8 @@ module GHC.Stg.FVs ( import GhcPrelude import GHC.Stg.Syntax -import Id -import VarSet +import GHC.Types.Id +import GHC.Types.Var.Set import GHC.Core ( Tickish(Breakpoint) ) import Outputable import Util diff --git a/compiler/GHC/Stg/Lift.hs b/compiler/GHC/Stg/Lift.hs index a0223707d7..f90ef519fe 100644 --- a/compiler/GHC/Stg/Lift.hs +++ b/compiler/GHC/Stg/Lift.hs @@ -19,17 +19,17 @@ where import GhcPrelude -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session -import Id +import GHC.Types.Id import GHC.Stg.FVs ( annBindingFreeVars ) import GHC.Stg.Lift.Analysis import GHC.Stg.Lift.Monad import GHC.Stg.Syntax import Outputable -import UniqSupply +import GHC.Types.Unique.Supply import Util -import VarSet +import GHC.Types.Var.Set import Control.Monad ( when ) import Data.Maybe ( isNothing ) diff --git a/compiler/GHC/Stg/Lift/Analysis.hs b/compiler/GHC/Stg/Lift/Analysis.hs index cc477e0eaa..13778237ea 100644 --- a/compiler/GHC/Stg/Lift/Analysis.hs +++ b/compiler/GHC/Stg/Lift/Analysis.hs @@ -23,10 +23,10 @@ module GHC.Stg.Lift.Analysis ( import GhcPrelude import GHC.Platform -import BasicTypes -import Demand +import GHC.Types.Basic +import GHC.Types.Demand import GHC.Driver.Session -import Id +import GHC.Types.Id import GHC.Runtime.Heap.Layout ( WordOff ) import GHC.Stg.Syntax import qualified GHC.StgToCmm.ArgRep as StgToCmm.ArgRep @@ -34,7 +34,7 @@ import qualified GHC.StgToCmm.Closure as StgToCmm.Closure import qualified GHC.StgToCmm.Layout as StgToCmm.Layout import Outputable import Util -import VarSet +import GHC.Types.Var.Set import Data.Maybe ( mapMaybe ) diff --git a/compiler/GHC/Stg/Lift/Monad.hs b/compiler/GHC/Stg/Lift/Monad.hs index 8c0a6d27fc..28ec3e1e69 100644 --- a/compiler/GHC/Stg/Lift/Monad.hs +++ b/compiler/GHC/Stg/Lift/Monad.hs @@ -24,21 +24,21 @@ module GHC.Stg.Lift.Monad ( import GhcPrelude -import BasicTypes -import CostCentre ( isCurrentCCS, dontCareCCS ) +import GHC.Types.Basic +import GHC.Types.CostCentre ( isCurrentCCS, dontCareCCS ) import GHC.Driver.Session import FastString -import Id -import Name +import GHC.Types.Id +import GHC.Types.Name import Outputable import OrdList import GHC.Stg.Subst import GHC.Stg.Syntax import GHC.Core.Type -import UniqSupply +import GHC.Types.Unique.Supply import Util -import VarEnv -import VarSet +import GHC.Types.Var.Env +import GHC.Types.Var.Set import Control.Arrow ( second ) import Control.Monad.Trans.Class @@ -271,7 +271,7 @@ withLiftedBndr abs_ids bndr inner = do let str = "$l" ++ occNameString (getOccName bndr) let ty = mkLamTypes (dVarSetElems abs_ids) (idType bndr) let bndr' - -- See Note [transferPolyIdInfo] in Id.hs. We need to do this at least + -- See Note [transferPolyIdInfo] in GHC.Types.Id. We need to do this at least -- for arity information. = transferPolyIdInfo bndr (dVarSetElems abs_ids) . mkSysLocal (mkFastString str) uniq diff --git a/compiler/GHC/Stg/Lint.hs b/compiler/GHC/Stg/Lint.hs index 3d06815832..bf4cfce443 100644 --- a/compiler/GHC/Stg/Lint.hs +++ b/compiler/GHC/Stg/Lint.hs @@ -42,20 +42,20 @@ import GhcPrelude import GHC.Stg.Syntax import GHC.Driver.Session -import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList ) -import BasicTypes ( TopLevelFlag(..), isTopLevel ) -import CostCentre ( isCurrentCCS ) -import Id ( Id, idType, isJoinId, idName ) -import VarSet +import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList ) +import GHC.Types.Basic ( TopLevelFlag(..), isTopLevel ) +import GHC.Types.CostCentre ( isCurrentCCS ) +import GHC.Types.Id ( Id, idType, isJoinId, idName ) +import GHC.Types.Var.Set import GHC.Core.DataCon -import GHC.Core ( AltCon(..) ) -import Name ( getSrcLoc, nameIsLocalOrFrom ) -import ErrUtils ( MsgDoc, Severity(..), mkLocMessage ) +import GHC.Core ( AltCon(..) ) +import GHC.Types.Name ( getSrcLoc, nameIsLocalOrFrom ) +import ErrUtils ( MsgDoc, Severity(..), mkLocMessage ) import GHC.Core.Type import GHC.Types.RepType -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import Module ( Module ) +import GHC.Types.Module ( Module ) import qualified ErrUtils as Err import Control.Applicative ((<|>)) import Control.Monad diff --git a/compiler/GHC/Stg/Pipeline.hs b/compiler/GHC/Stg/Pipeline.hs index 457466291d..4b463cb95e 100644 --- a/compiler/GHC/Stg/Pipeline.hs +++ b/compiler/GHC/Stg/Pipeline.hs @@ -23,11 +23,11 @@ import GHC.Stg.DepAnal ( depSortStgPgm ) import GHC.Stg.Unarise ( unarise ) import GHC.Stg.CSE ( stgCse ) import GHC.Stg.Lift ( stgLiftLams ) -import Module ( Module ) +import GHC.Types.Module ( Module ) import GHC.Driver.Session import ErrUtils -import UniqSupply +import GHC.Types.Unique.Supply import Outputable import Control.Monad import Control.Monad.IO.Class diff --git a/compiler/GHC/Stg/Stats.hs b/compiler/GHC/Stg/Stats.hs index 8a4fa7561b..c2d546d587 100644 --- a/compiler/GHC/Stg/Stats.hs +++ b/compiler/GHC/Stg/Stats.hs @@ -31,7 +31,7 @@ import GhcPrelude import GHC.Stg.Syntax -import Id (Id) +import GHC.Types.Id (Id) import Panic import Data.Map (Map) diff --git a/compiler/GHC/Stg/Subst.hs b/compiler/GHC/Stg/Subst.hs index aa07c48b36..abbbfb0fd7 100644 --- a/compiler/GHC/Stg/Subst.hs +++ b/compiler/GHC/Stg/Subst.hs @@ -6,8 +6,8 @@ module GHC.Stg.Subst where import GhcPrelude -import Id -import VarEnv +import GHC.Types.Id +import GHC.Types.Var.Env import Control.Monad.Trans.State.Strict import Outputable import Util diff --git a/compiler/GHC/Stg/Syntax.hs b/compiler/GHC/Stg/Syntax.hs index 534cdbfbcb..e31327c06c 100644 --- a/compiler/GHC/Stg/Syntax.hs +++ b/compiler/GHC/Stg/Syntax.hs @@ -64,22 +64,22 @@ module GHC.Stg.Syntax ( import GhcPrelude import GHC.Core ( AltCon, Tickish ) -import CostCentre ( CostCentreStack ) +import GHC.Types.CostCentre ( CostCentreStack ) import Data.ByteString ( ByteString ) import Data.Data ( Data ) import Data.List ( intersperse ) import GHC.Core.DataCon import GHC.Driver.Session -import ForeignCall ( ForeignCall ) -import Id -import VarSet -import Literal ( Literal, literalType ) -import Module ( Module ) +import GHC.Types.ForeignCall ( ForeignCall ) +import GHC.Types.Id +import GHC.Types.Var.Set +import GHC.Types.Literal ( Literal, literalType ) +import GHC.Types.Module ( Module ) import Outputable import GHC.Driver.Packages ( isDynLinkName ) import GHC.Platform import GHC.Core.Ppr( {- instances -} ) -import PrimOp ( PrimOp, PrimCall ) +import PrimOp ( PrimOp, PrimCall ) import GHC.Core.TyCon ( PrimRep(..), TyCon ) import GHC.Core.Type ( Type ) import GHC.Types.RepType ( typePrimRep1 ) diff --git a/compiler/GHC/Stg/Unarise.hs b/compiler/GHC/Stg/Unarise.hs index 98738470b2..6e163ab3e9 100644 --- a/compiler/GHC/Stg/Unarise.hs +++ b/compiler/GHC/Stg/Unarise.hs @@ -202,14 +202,14 @@ module GHC.Stg.Unarise (unarise) where import GhcPrelude -import BasicTypes +import GHC.Types.Basic import GHC.Core import GHC.Core.DataCon import FastString (FastString, mkFastString) -import Id -import Literal +import GHC.Types.Id +import GHC.Types.Literal import GHC.Core.Make (aBSENT_SUM_FIELD_ERROR_ID) -import MkId (voidPrimId, voidArgId) +import GHC.Types.Id.Make (voidPrimId, voidArgId) import MonadUtils (mapAccumLM) import Outputable import GHC.Types.RepType @@ -217,9 +217,9 @@ import GHC.Stg.Syntax import GHC.Core.Type import TysPrim (intPrimTy,wordPrimTy,word64PrimTy) import TysWiredIn -import UniqSupply +import GHC.Types.Unique.Supply import Util -import VarEnv +import GHC.Types.Var.Env import Data.Bifunctor (second) import Data.Maybe (mapMaybe) diff --git a/compiler/GHC/StgToCmm.hs b/compiler/GHC/StgToCmm.hs index 31ebdede81..4c4b5b5a9e 100644 --- a/compiler/GHC/StgToCmm.hs +++ b/compiler/GHC/StgToCmm.hs @@ -34,17 +34,17 @@ import GHC.Driver.Session import ErrUtils import GHC.Driver.Types -import CostCentre -import Id -import IdInfo +import GHC.Types.CostCentre +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Types.RepType import GHC.Core.DataCon import GHC.Core.TyCon -import Module +import GHC.Types.Module import Outputable import Stream -import BasicTypes -import VarSet ( isEmptyDVarSet ) +import GHC.Types.Basic +import GHC.Types.Var.Set ( isEmptyDVarSet ) import OrdList import GHC.Cmm.Graph diff --git a/compiler/GHC/StgToCmm/ArgRep.hs b/compiler/GHC/StgToCmm/ArgRep.hs index 2839a2ff56..a36aa4c268 100644 --- a/compiler/GHC/StgToCmm/ArgRep.hs +++ b/compiler/GHC/StgToCmm/ArgRep.hs @@ -20,13 +20,12 @@ module GHC.StgToCmm.ArgRep ( import GhcPrelude import GHC.Platform -import GHC.StgToCmm.Closure ( idPrimRep ) - +import GHC.StgToCmm.Closure ( idPrimRep ) import GHC.Runtime.Heap.Layout ( WordOff ) -import Id ( Id ) -import GHC.Core.TyCon ( PrimRep(..), primElemRepSizeB ) -import BasicTypes ( RepArity ) -import Constants ( wORD64_SIZE, dOUBLE_SIZE ) +import GHC.Types.Id ( Id ) +import GHC.Core.TyCon ( PrimRep(..), primElemRepSizeB ) +import GHC.Types.Basic ( RepArity ) +import Constants ( wORD64_SIZE, dOUBLE_SIZE ) import Outputable import FastString diff --git a/compiler/GHC/StgToCmm/Bind.hs b/compiler/GHC/StgToCmm/Bind.hs index d60e2805d4..8db97d8083 100644 --- a/compiler/GHC/StgToCmm/Bind.hs +++ b/compiler/GHC/StgToCmm/Bind.hs @@ -38,15 +38,15 @@ import GHC.Cmm.Info import GHC.Cmm.Utils import GHC.Cmm.CLabel import GHC.Stg.Syntax -import CostCentre -import Id -import IdInfo -import Name -import Module +import GHC.Types.CostCentre +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Name +import GHC.Types.Module import ListSetOps import Util -import VarSet -import BasicTypes +import GHC.Types.Var.Set +import GHC.Types.Basic import Outputable import FastString import GHC.Driver.Session diff --git a/compiler/GHC/StgToCmm/Closure.hs b/compiler/GHC/StgToCmm/Closure.hs index 7bb73111a9..3aa9dc8ef4 100644 --- a/compiler/GHC/StgToCmm/Closure.hs +++ b/compiler/GHC/StgToCmm/Closure.hs @@ -71,19 +71,19 @@ import GHC.Runtime.Heap.Layout import GHC.Cmm import GHC.Cmm.Ppr.Expr() -- For Outputable instances -import CostCentre +import GHC.Types.CostCentre import GHC.Cmm.BlockId import GHC.Cmm.CLabel -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.DataCon -import Name +import GHC.Types.Name import GHC.Core.Type import GHC.Core.TyCo.Rep import TcType import GHC.Core.TyCon import GHC.Types.RepType -import BasicTypes +import GHC.Types.Basic import Outputable import GHC.Driver.Session import Util diff --git a/compiler/GHC/StgToCmm/DataCon.hs b/compiler/GHC/StgToCmm/DataCon.hs index 2da91879b3..abf88ffbe3 100644 --- a/compiler/GHC/StgToCmm/DataCon.hs +++ b/compiler/GHC/StgToCmm/DataCon.hs @@ -34,14 +34,14 @@ import GHC.Cmm.Utils import GHC.Cmm.CLabel import GHC.Cmm.Graph import GHC.Runtime.Heap.Layout -import CostCentre -import Module +import GHC.Types.CostCentre +import GHC.Types.Module import GHC.Core.DataCon import GHC.Driver.Session import FastString -import Id +import GHC.Types.Id import GHC.Types.RepType (countConRepArgs) -import Literal +import GHC.Types.Literal import PrelInfo import Outputable import GHC.Platform diff --git a/compiler/GHC/StgToCmm/Env.hs b/compiler/GHC/StgToCmm/Env.hs index 47c46eed63..047353b89a 100644 --- a/compiler/GHC/StgToCmm/Env.hs +++ b/compiler/GHC/StgToCmm/Env.hs @@ -38,16 +38,16 @@ import GHC.Cmm.BlockId import GHC.Cmm.Expr import GHC.Cmm.Utils import GHC.Driver.Session -import Id +import GHC.Types.Id import GHC.Cmm.Graph -import Name +import GHC.Types.Name import Outputable import GHC.Stg.Syntax import GHC.Core.Type import TysPrim -import UniqFM +import GHC.Types.Unique.FM import Util -import VarEnv +import GHC.Types.Var.Env ------------------------------------- -- Manipulating CgIdInfo diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs index f896b4d598..cb06799316 100644 --- a/compiler/GHC/StgToCmm/Expr.hs +++ b/compiler/GHC/StgToCmm/Expr.hs @@ -39,13 +39,13 @@ import GHC.Cmm.Info import GHC.Core import GHC.Core.DataCon import GHC.Driver.Session ( mAX_PTR_TAG ) -import ForeignCall -import Id +import GHC.Types.ForeignCall +import GHC.Types.Id import PrimOp import GHC.Core.TyCon -import GHC.Core.Type ( isUnliftedType ) -import GHC.Types.RepType ( isVoidTy, countConRepArgs ) -import CostCentre ( CostCentreStack, currentCCS ) +import GHC.Core.Type ( isUnliftedType ) +import GHC.Types.RepType ( isVoidTy, countConRepArgs ) +import GHC.Types.CostCentre ( CostCentreStack, currentCCS ) import Maybes import Util import FastString diff --git a/compiler/GHC/StgToCmm/ExtCode.hs b/compiler/GHC/StgToCmm/ExtCode.hs index 40472245ed..84195a67d2 100644 --- a/compiler/GHC/StgToCmm/ExtCode.hs +++ b/compiler/GHC/StgToCmm/ExtCode.hs @@ -49,10 +49,10 @@ import GHC.Cmm.Graph import GHC.Cmm.BlockId import GHC.Driver.Session import FastString -import Module -import UniqFM -import Unique -import UniqSupply +import GHC.Types.Module +import GHC.Types.Unique.FM +import GHC.Types.Unique +import GHC.Types.Unique.Supply import Control.Monad (ap) diff --git a/compiler/GHC/StgToCmm/Foreign.hs b/compiler/GHC/StgToCmm/Foreign.hs index 767e70939b..2a0578327a 100644 --- a/compiler/GHC/StgToCmm/Foreign.hs +++ b/compiler/GHC/StgToCmm/Foreign.hs @@ -36,13 +36,13 @@ import GHC.Core.Type import GHC.Types.RepType import GHC.Cmm.CLabel import GHC.Runtime.Heap.Layout -import ForeignCall +import GHC.Types.ForeignCall import GHC.Driver.Session import GHC.Platform import Maybes import Outputable -import UniqSupply -import BasicTypes +import GHC.Types.Unique.Supply +import GHC.Types.Basic import GHC.Core.TyCo.Rep import TysPrim diff --git a/compiler/GHC/StgToCmm/Heap.hs b/compiler/GHC/StgToCmm/Heap.hs index 740103e3b1..9a66d77c7f 100644 --- a/compiler/GHC/StgToCmm/Heap.hs +++ b/compiler/GHC/StgToCmm/Heap.hs @@ -41,10 +41,10 @@ import GHC.Runtime.Heap.Layout import GHC.Cmm.BlockId import GHC.Cmm import GHC.Cmm.Utils -import CostCentre -import IdInfo( CafInfo(..), mayHaveCafRefs ) -import Id ( Id ) -import Module +import GHC.Types.CostCentre +import GHC.Types.Id.Info( CafInfo(..), mayHaveCafRefs ) +import GHC.Types.Id ( Id ) +import GHC.Types.Module import GHC.Driver.Session import GHC.Platform import FastString( mkFastString, fsLit ) diff --git a/compiler/GHC/StgToCmm/Hpc.hs b/compiler/GHC/StgToCmm/Hpc.hs index 886c0e12e8..1b7305da4e 100644 --- a/compiler/GHC/StgToCmm/Hpc.hs +++ b/compiler/GHC/StgToCmm/Hpc.hs @@ -16,7 +16,7 @@ import GHC.Platform import GHC.Cmm.Graph import GHC.Cmm.Expr import GHC.Cmm.CLabel -import Module +import GHC.Types.Module import GHC.Cmm.Utils import GHC.StgToCmm.Utils import GHC.Driver.Types diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs index 08e83b84d3..14ec8445c5 100644 --- a/compiler/GHC/StgToCmm/Layout.hs +++ b/compiler/GHC/StgToCmm/Layout.hs @@ -49,12 +49,12 @@ import GHC.Cmm.Utils import GHC.Cmm.Info import GHC.Cmm.CLabel import GHC.Stg.Syntax -import Id +import GHC.Types.Id import GHC.Core.TyCon ( PrimRep(..), primRepSizeB ) -import BasicTypes ( RepArity ) +import GHC.Types.Basic ( RepArity ) import GHC.Driver.Session import GHC.Platform -import Module +import GHC.Types.Module import Util import Data.List diff --git a/compiler/GHC/StgToCmm/Monad.hs b/compiler/GHC/StgToCmm/Monad.hs index 9edff8bd66..a23d942c60 100644 --- a/compiler/GHC/StgToCmm/Monad.hs +++ b/compiler/GHC/StgToCmm/Monad.hs @@ -70,13 +70,13 @@ import GHC.Cmm.Graph as CmmGraph import GHC.Cmm.BlockId import GHC.Cmm.CLabel import GHC.Runtime.Heap.Layout -import Module -import Id -import VarEnv +import GHC.Types.Module +import GHC.Types.Id +import GHC.Types.Var.Env import OrdList -import BasicTypes( ConTagZ ) -import Unique -import UniqSupply +import GHC.Types.Basic( ConTagZ ) +import GHC.Types.Unique +import GHC.Types.Unique.Supply import FastString import Outputable import Util diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs index 5b43837417..665fdeb21d 100644 --- a/compiler/GHC/StgToCmm/Prim.hs +++ b/compiler/GHC/StgToCmm/Prim.hs @@ -37,12 +37,12 @@ import GHC.StgToCmm.Prof ( costCentreFrom ) import GHC.Driver.Session import GHC.Platform -import BasicTypes +import GHC.Types.Basic import GHC.Cmm.BlockId import GHC.Cmm.Graph import GHC.Stg.Syntax import GHC.Cmm -import Module ( rtsUnitId ) +import GHC.Types.Module ( rtsUnitId ) import GHC.Core.Type ( Type, tyConAppTyCon ) import GHC.Core.TyCon import GHC.Cmm.CLabel diff --git a/compiler/GHC/StgToCmm/Prof.hs b/compiler/GHC/StgToCmm/Prof.hs index c97bd793be..54e49eee87 100644 --- a/compiler/GHC/StgToCmm/Prof.hs +++ b/compiler/GHC/StgToCmm/Prof.hs @@ -36,10 +36,10 @@ import GHC.Cmm import GHC.Cmm.Utils import GHC.Cmm.CLabel -import CostCentre +import GHC.Types.CostCentre import GHC.Driver.Session import FastString -import Module +import GHC.Types.Module as Module import Outputable import Control.Monad diff --git a/compiler/GHC/StgToCmm/Ticky.hs b/compiler/GHC/StgToCmm/Ticky.hs index c472a2815b..d6cea4206c 100644 --- a/compiler/GHC/StgToCmm/Ticky.hs +++ b/compiler/GHC/StgToCmm/Ticky.hs @@ -120,10 +120,10 @@ import GHC.Cmm.Utils import GHC.Cmm.CLabel import GHC.Runtime.Heap.Layout -import Module -import Name -import Id -import BasicTypes +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Id +import GHC.Types.Basic import FastString import Outputable import Util diff --git a/compiler/GHC/StgToCmm/Utils.hs b/compiler/GHC/StgToCmm/Utils.hs index 178572eb64..1f439db546 100644 --- a/compiler/GHC/StgToCmm/Utils.hs +++ b/compiler/GHC/StgToCmm/Utils.hs @@ -64,22 +64,22 @@ import GHC.Cmm.Utils hiding (mkDataLits, mkRODataLits, mkByteStringCLit) import GHC.Cmm.Switch import GHC.StgToCmm.CgUtils -import ForeignCall -import IdInfo +import GHC.Types.ForeignCall +import GHC.Types.Id.Info import GHC.Core.Type import GHC.Core.TyCon import GHC.Runtime.Heap.Layout -import Module -import Literal +import GHC.Types.Module +import GHC.Types.Literal import Digraph import Util -import Unique -import UniqSupply (MonadUnique(..)) +import GHC.Types.Unique +import GHC.Types.Unique.Supply (MonadUnique(..)) import GHC.Driver.Session import FastString import Outputable import GHC.Types.RepType -import CostCentre +import GHC.Types.CostCentre import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BS8 diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index b881186799..4eb52b4970 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -28,21 +28,21 @@ import GhcPrelude import GHC.Hs as Hs import PrelNames -import RdrName -import qualified Name -import Module +import GHC.Types.Name.Reader +import qualified GHC.Types.Name as Name +import GHC.Types.Module import RdrHsSyn -import OccName -import SrcLoc +import GHC.Types.Name.Occurrence as OccName +import GHC.Types.SrcLoc import GHC.Core.Type import qualified GHC.Core.Coercion as Coercion ( Role(..) ) import TysWiredIn -import BasicTypes as Hs -import ForeignCall -import Unique +import GHC.Types.Basic as Hs +import GHC.Types.ForeignCall +import GHC.Types.Unique import ErrUtils import Bag -import Lexeme +import GHC.Utils.Lexeme import Util import FastString import Outputable diff --git a/compiler/main/Annotations.hs b/compiler/GHC/Types/Annotations.hs index 3c4340e900..4dde431ab5 100644 --- a/compiler/main/Annotations.hs +++ b/compiler/GHC/Types/Annotations.hs @@ -5,7 +5,7 @@ -- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -- {-# LANGUAGE DeriveFunctor #-} -module Annotations ( +module GHC.Types.Annotations ( -- * Main Annotation data types Annotation(..), AnnPayload, AnnTarget(..), CoreAnnTarget, @@ -20,12 +20,12 @@ module Annotations ( import GhcPrelude import Binary -import Module ( Module +import GHC.Types.Module ( Module , ModuleEnv, emptyModuleEnv, extendModuleEnvWith , plusModuleEnv_C, lookupWithDefaultModuleEnv , mapModuleEnv ) -import NameEnv -import Name +import GHC.Types.Name.Env +import GHC.Types.Name import Outputable import GHC.Serialized diff --git a/compiler/basicTypes/Avail.hs b/compiler/GHC/Types/Avail.hs index 6c15828cde..8730ce2e88 100644 --- a/compiler/basicTypes/Avail.hs +++ b/compiler/GHC/Types/Avail.hs @@ -6,7 +6,7 @@ #include "HsVersions.h" -module Avail ( +module GHC.Types.Avail ( Avails, AvailInfo(..), avail, @@ -30,11 +30,11 @@ module Avail ( import GhcPrelude -import Name -import NameEnv -import NameSet +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set -import FieldLabel +import GHC.Types.FieldLabel import Binary import ListSetOps import Outputable diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/GHC/Types/Basic.hs index a954a7449b..03988d9028 100644 --- a/compiler/basicTypes/BasicTypes.hs +++ b/compiler/GHC/Types/Basic.hs @@ -17,7 +17,7 @@ types that {-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} -module BasicTypes( +module GHC.Types.Basic ( Version, bumpVersion, initialVersion, LeftOrRight(..), @@ -117,7 +117,7 @@ import GhcPrelude import FastString import Outputable -import SrcLoc ( Located,unLoc ) +import GHC.Types.SrcLoc ( Located,unLoc ) import Data.Data hiding (Fixity, Prefix, Infix) import Data.Function (on) import Data.Bits @@ -915,9 +915,9 @@ of the type of the method signature. ************************************************************************ This data type is used exclusively by the simplifier, but it appears in a -SubstResult, which is currently defined in VarEnv, which is pretty near -the base of the module hierarchy. So it seemed simpler to put the -defn of OccInfo here, safely at the bottom +SubstResult, which is currently defined in GHC.Types.Var.Env, which is pretty +near the base of the module hierarchy. So it seemed simpler to put the defn of +OccInfo here, safely at the bottom -} -- | identifier Occurrence Information diff --git a/compiler/profiling/CostCentre.hs b/compiler/GHC/Types/CostCentre.hs index 91a4ef0ec7..5280d90d31 100644 --- a/compiler/profiling/CostCentre.hs +++ b/compiler/GHC/Types/CostCentre.hs @@ -1,5 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-} -module CostCentre ( +module GHC.Types.CostCentre ( CostCentre(..), CcName, CCFlavour(..), -- All abstract except to friend: ParseIface.y @@ -23,15 +23,15 @@ module CostCentre ( import GhcPrelude import Binary -import Var -import Name -import Module -import Unique +import GHC.Types.Var +import GHC.Types.Name +import GHC.Types.Module +import GHC.Types.Unique import Outputable -import SrcLoc +import GHC.Types.SrcLoc import FastString import Util -import CostCentreState +import GHC.Types.CostCentre.State import Data.Data diff --git a/compiler/profiling/ProfInit.hs b/compiler/GHC/Types/CostCentre/Init.hs index 411f136c98..ad6a95e7ab 100644 --- a/compiler/profiling/ProfInit.hs +++ b/compiler/GHC/Types/CostCentre/Init.hs @@ -6,15 +6,15 @@ -- -- ----------------------------------------------------------------------------- -module ProfInit (profilingInitCode) where +module GHC.Types.CostCentre.Init (profilingInitCode) where import GhcPrelude import GHC.Cmm.CLabel -import CostCentre +import GHC.Types.CostCentre import GHC.Driver.Session import Outputable -import Module +import GHC.Types.Module -- ----------------------------------------------------------------------------- -- Initialising cost centres diff --git a/compiler/profiling/CostCentreState.hs b/compiler/GHC/Types/CostCentre/State.hs index 0050c1d033..51c364f776 100644 --- a/compiler/profiling/CostCentreState.hs +++ b/compiler/GHC/Types/CostCentre/State.hs @@ -1,8 +1,13 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -module CostCentreState ( CostCentreState, newCostCentreState - , CostCentreIndex, unCostCentreIndex, getCCIndex - ) where +module GHC.Types.CostCentre.State + ( CostCentreState + , newCostCentreState + , CostCentreIndex + , unCostCentreIndex + , getCCIndex + ) +where import GhcPrelude import FastString diff --git a/compiler/basicTypes/Cpr.hs b/compiler/GHC/Types/Cpr.hs index 3a987fe2b5..16f5f1041d 100644 --- a/compiler/basicTypes/Cpr.hs +++ b/compiler/GHC/Types/Cpr.hs @@ -1,7 +1,7 @@ {-# LANGUAGE GeneralisedNewtypeDeriving #-} -- | Types for the Constructed Product Result lattice. "GHC.Core.Op.CprAnal" and "GHC.Core.Op.WorkWrap.Lib" -- are its primary customers via 'idCprInfo'. -module Cpr ( +module GHC.Types.Cpr ( CprResult, topCpr, botCpr, conCpr, asConCpr, CprType (..), topCprType, botCprType, conCprType, lubCprType, applyCprTy, abstractCprTy, ensureCprTyArity, trimCprTy, @@ -10,7 +10,7 @@ module Cpr ( import GhcPrelude -import BasicTypes +import GHC.Types.Basic import Outputable import Binary @@ -113,7 +113,7 @@ trimCprTy :: CprType -> CprType trimCprTy (CprType arty res) = CprType arty (trimCpr res) -- | The arity of the wrapped 'CprType' is the arity at which it is safe --- to unleash. See Note [Understanding DmdType and StrictSig] in Demand +-- to unleash. See Note [Understanding DmdType and StrictSig] in GHC.Types.Demand newtype CprSig = CprSig { getCprSig :: CprType } deriving (Eq, Binary) diff --git a/compiler/basicTypes/Demand.hs b/compiler/GHC/Types/Demand.hs index 28282d4382..f9ca821872 100644 --- a/compiler/basicTypes/Demand.hs +++ b/compiler/GHC/Types/Demand.hs @@ -8,7 +8,7 @@ {-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances, RecordWildCards #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -module Demand ( +module GHC.Types.Demand ( StrDmd, UseDmd(..), Count, Demand, DmdShell, CleanDemand, getStrDmd, getUseDmd, @@ -61,11 +61,11 @@ module Demand ( import GhcPrelude import Outputable -import Var ( Var ) -import VarEnv -import UniqFM +import GHC.Types.Var ( Var ) +import GHC.Types.Var.Env +import GHC.Types.Unique.FM import Util -import BasicTypes +import GHC.Types.Basic import Binary import Maybes ( orElse ) diff --git a/compiler/basicTypes/FieldLabel.hs b/compiler/GHC/Types/FieldLabel.hs index d73dbd3ad3..e73877b292 100644 --- a/compiler/basicTypes/FieldLabel.hs +++ b/compiler/GHC/Types/FieldLabel.hs @@ -37,7 +37,7 @@ Now there will be two FieldLabel values for 'foo', one in T and one in U. They share the same label (FieldLabelString), but the selector functions differ. -See also Note [Representing fields in AvailInfo] in Avail. +See also Note [Representing fields in AvailInfo] in GHC.Types.Avail. Note [Why selector names include data constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -62,17 +62,19 @@ Of course, datatypes with no constructors cannot have any fields. {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} -module FieldLabel ( FieldLabelString - , FieldLabelEnv - , FieldLbl(..) - , FieldLabel - , mkFieldLabelOccs - ) where +module GHC.Types.FieldLabel + ( FieldLabelString + , FieldLabelEnv + , FieldLbl(..) + , FieldLabel + , mkFieldLabelOccs + ) +where import GhcPrelude -import OccName -import Name +import GHC.Types.Name.Occurrence +import GHC.Types.Name import FastString import FastStringEnv diff --git a/compiler/prelude/ForeignCall.hs b/compiler/GHC/Types/ForeignCall.hs index c143b1ed1e..b745a6138f 100644 --- a/compiler/prelude/ForeignCall.hs +++ b/compiler/GHC/Types/ForeignCall.hs @@ -6,7 +6,7 @@ {-# LANGUAGE DeriveDataTypeable #-} -module ForeignCall ( +module GHC.Types.ForeignCall ( ForeignCall(..), isSafeForeignCall, Safety(..), playSafe, playInterruptible, @@ -23,8 +23,8 @@ import GhcPrelude import FastString import Binary import Outputable -import Module -import BasicTypes ( SourceText, pprWithSourceText ) +import GHC.Types.Module +import GHC.Types.Basic ( SourceText, pprWithSourceText ) import Data.Char import Data.Data @@ -91,7 +91,7 @@ playInterruptible _ = False data CExportSpec = CExportStatic -- foreign export ccall foo :: ty SourceText -- of the CLabelString. - -- See note [Pragma source text] in BasicTypes + -- See note [Pragma source text] in GHC.Types.Basic CLabelString -- C Name of exported function CCallConv deriving Data @@ -109,7 +109,7 @@ data CCallTarget -- An "unboxed" ccall# to named function in a particular package. = StaticTarget SourceText -- of the CLabelString. - -- See note [Pragma source text] in BasicTypes + -- See note [Pragma source text] in GHC.Types.Basic CLabelString -- C-land name of label. (Maybe UnitId) -- What package the function is in. @@ -218,7 +218,7 @@ instance Outputable CCallSpec where = text "__dyn_ccall" <> gc_suf <+> text "\"\"" -- The filename for a C header file --- Note [Pragma source text] in BasicTypes +-- Note [Pragma source text] in GHC.Types.Basic data Header = Header SourceText FastString deriving (Eq, Data) @@ -232,7 +232,7 @@ instance Outputable Header where -- 'ApiAnnotation.AnnClose' @'\#-}'@, -- For details on above see note [Api annotations] in ApiAnnotation -data CType = CType SourceText -- Note [Pragma source text] in BasicTypes +data CType = CType SourceText -- Note [Pragma source text] in GHC.Types.Basic (Maybe Header) -- header to include for this type (SourceText,FastString) -- the type itself deriving (Eq, Data) diff --git a/compiler/basicTypes/Id.hs b/compiler/GHC/Types/Id.hs index 67cde9a0fc..e62113390c 100644 --- a/compiler/basicTypes/Id.hs +++ b/compiler/GHC/Types/Id.hs @@ -25,7 +25,7 @@ -- -- * 'Var.Var': see "Var#name_types" -module Id ( +module GHC.Types.Id ( -- * The main types Var, Id, isId, @@ -47,7 +47,7 @@ module Id ( recordSelectorTyCon, -- ** Modifying an Id - setIdName, setIdUnique, Id.setIdType, + setIdName, setIdUnique, GHC.Types.Id.setIdType, setIdExported, setIdNotExported, globaliseId, localiseId, setIdInfo, lazySetIdInfo, modifyIdInfo, maybeModifyIdInfo, @@ -124,33 +124,33 @@ import GHC.Driver.Session import GHC.Core ( CoreRule, isStableUnfolding, evaldUnfolding, isCompulsoryUnfolding, Unfolding( NoUnfolding ) ) -import IdInfo -import BasicTypes +import GHC.Types.Id.Info +import GHC.Types.Basic -- Imported and re-exported -import Var( Id, CoVar, JoinId, +import GHC.Types.Var( Id, CoVar, JoinId, InId, InVar, OutId, OutVar, - idInfo, idDetails, setIdDetails, globaliseId, varType, + idInfo, idDetails, setIdDetails, globaliseId, isId, isLocalId, isGlobalId, isExportedId ) -import qualified Var +import qualified GHC.Types.Var as Var import GHC.Core.Type import GHC.Types.RepType import TysPrim import GHC.Core.DataCon -import Demand -import Cpr -import Name -import Module +import GHC.Types.Demand +import GHC.Types.Cpr +import GHC.Types.Name +import GHC.Types.Module import GHC.Core.Class import {-# SOURCE #-} PrimOp (PrimOp) -import ForeignCall +import GHC.Types.ForeignCall import Maybes -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import Unique -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Supply import FastString import Util @@ -709,7 +709,7 @@ setCaseBndrEvald str id --------------------------------- -- SPECIALISATION --- See Note [Specialisations and RULES in IdInfo] in IdInfo.hs +-- See Note [Specialisations and RULES in IdInfo] in GHC.Types.Id.Info idSpecialisation :: Id -> RuleInfo idSpecialisation id = ruleInfo (idInfo id) diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/GHC/Types/Id/Info.hs index dcf1740d3c..e731fc1449 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/GHC/Types/Id/Info.hs @@ -13,7 +13,7 @@ Haskell. [WDP 94/11]) {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} -module IdInfo ( +module GHC.Types.Id.Info ( -- * The IdDetails type IdDetails(..), pprIdDetails, coVarDetails, isCoVarDetails, JoinArity, isJoinIdDetails_maybe, @@ -90,18 +90,18 @@ import GHC.Core import GHC.Core.Class import {-# SOURCE #-} PrimOp (PrimOp) -import Name -import VarSet -import BasicTypes +import GHC.Types.Name +import GHC.Types.Var.Set +import GHC.Types.Basic import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.PatSyn import GHC.Core.Type -import ForeignCall +import GHC.Types.ForeignCall import Outputable -import Module -import Demand -import Cpr +import GHC.Types.Module +import GHC.Types.Demand +import GHC.Types.Cpr import Util -- infixl so you can say (id `set` a `set` b) @@ -332,7 +332,7 @@ vanillaIdInfo -- | More informative 'IdInfo' we can use when we know the 'Id' has no CAF references noCafIdInfo :: IdInfo noCafIdInfo = vanillaIdInfo `setCafInfo` NoCafRefs - -- Used for built-in type Ids in MkId. + -- Used for built-in type Ids in GHC.Types.Id.Make. {- ************************************************************************ diff --git a/compiler/basicTypes/IdInfo.hs-boot b/compiler/GHC/Types/Id/Info.hs-boot index cacfe6af2e..c6912344aa 100644 --- a/compiler/basicTypes/IdInfo.hs-boot +++ b/compiler/GHC/Types/Id/Info.hs-boot @@ -1,4 +1,4 @@ -module IdInfo where +module GHC.Types.Id.Info where import GhcPrelude import Outputable data IdInfo diff --git a/compiler/basicTypes/MkId.hs b/compiler/GHC/Types/Id/Make.hs index d785642524..43b7aae72d 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/GHC/Types/Id/Make.hs @@ -16,7 +16,7 @@ have a standard form, namely: {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -module MkId ( +module GHC.Types.Id.Make ( mkDictFunId, mkDictFunTy, mkDictSelId, mkDictSelRhs, mkPrimOpId, mkFCallId, @@ -54,29 +54,29 @@ import TcType import GHC.Core.Make import GHC.Core.Utils ( mkCast, mkDefaultCase ) import GHC.Core.Unfold -import Literal +import GHC.Types.Literal import GHC.Core.TyCon import GHC.Core.Class -import NameSet -import Name +import GHC.Types.Name.Set +import GHC.Types.Name import PrimOp -import ForeignCall +import GHC.Types.ForeignCall import GHC.Core.DataCon -import Id -import IdInfo -import Demand -import Cpr +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Demand +import GHC.Types.Cpr import GHC.Core -import Unique -import UniqSupply +import GHC.Types.Unique +import GHC.Types.Unique.Supply import PrelNames -import BasicTypes hiding ( SuccessFlag(..) ) +import GHC.Types.Basic hiding ( SuccessFlag(..) ) import Util import GHC.Driver.Session import Outputable import FastString import ListSetOps -import Var (VarBndr(Bndr)) +import GHC.Types.Var (VarBndr(Bndr)) import qualified GHC.LanguageExtensions as LangExt import Data.Maybe ( maybeToList ) @@ -1289,7 +1289,7 @@ Dict funs and default methods are *not* ImplicitIds. Their definition involves user-written code, so we can't figure out their strictness etc based on fixed info, as we can for constructors and record selectors (say). -NB: See also Note [Exported LocalIds] in Id +NB: See also Note [Exported LocalIds] in GHC.Types.Id -} mkDictFunId :: Name -- Name to use for the dict fun; diff --git a/compiler/basicTypes/MkId.hs-boot b/compiler/GHC/Types/Id/Make.hs-boot index 46695c5b74..25ae32207e 100644 --- a/compiler/basicTypes/MkId.hs-boot +++ b/compiler/GHC/Types/Id/Make.hs-boot @@ -1,6 +1,6 @@ -module MkId where -import Name( Name ) -import Var( Id ) +module GHC.Types.Id.Make where +import GHC.Types.Name( Name ) +import GHC.Types.Var( Id ) import GHC.Core.Class( Class ) import {-# SOURCE #-} GHC.Core.DataCon( DataCon ) import {-# SOURCE #-} PrimOp( PrimOp ) diff --git a/compiler/basicTypes/Literal.hs b/compiler/GHC/Types/Literal.hs index cd8a63e2ca..9e6a8e4ede 100644 --- a/compiler/basicTypes/Literal.hs +++ b/compiler/GHC/Types/Literal.hs @@ -8,7 +8,7 @@ {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -module Literal +module GHC.Types.Literal ( -- * Main data type Literal(..) -- Exported to ParseIface @@ -58,11 +58,11 @@ import GHC.Core.Type import GHC.Core.TyCon import Outputable import FastString -import BasicTypes +import GHC.Types.Basic import Binary import Constants import GHC.Platform -import UniqFM +import GHC.Types.Unique.FM import Util import Data.ByteString (ByteString) @@ -826,7 +826,7 @@ heap pointers. Here are the moving parts: -* We define LitRubbish as a constructor in Literal.Literal +* We define LitRubbish as a constructor in GHC.Types.Literal.Literal * It is given its polymorphic type by Literal.literalType diff --git a/compiler/basicTypes/Module.hs b/compiler/GHC/Types/Module.hs index 95031f50cd..a73df28a9e 100644 --- a/compiler/basicTypes/Module.hs +++ b/compiler/GHC/Types/Module.hs @@ -12,7 +12,7 @@ the keys. {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} -module Module +module GHC.Types.Module ( -- * The ModuleName type ModuleName, @@ -139,10 +139,10 @@ module Module import GhcPrelude import Outputable -import Unique -import UniqFM -import UniqDFM -import UniqDSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM +import GHC.Types.Unique.DSet import FastString import Binary import Util diff --git a/compiler/basicTypes/Module.hs-boot b/compiler/GHC/Types/Module.hs-boot index 36e8abf997..1f2fec56d7 100644 --- a/compiler/basicTypes/Module.hs-boot +++ b/compiler/GHC/Types/Module.hs-boot @@ -1,4 +1,4 @@ -module Module where +module GHC.Types.Module where import GhcPrelude import FastString diff --git a/compiler/basicTypes/Name.hs b/compiler/GHC/Types/Name.hs index fd868a8489..60aee23af8 100644 --- a/compiler/basicTypes/Name.hs +++ b/compiler/GHC/Types/Name.hs @@ -36,7 +36,7 @@ -- * Internal, if they name things in the module being compiled. Some internal -- Names are system names, if they are names manufactured by the compiler -module Name ( +module GHC.Types.Name ( -- * The main types Name, -- Abstract BuiltInSyntax(..), @@ -76,17 +76,17 @@ module Name ( nameStableString, -- Re-export the OccName stuff - module OccName + module GHC.Types.Name.Occurrence ) where import GhcPrelude import {-# SOURCE #-} GHC.Core.TyCo.Rep( TyThing ) -import OccName -import Module -import SrcLoc -import Unique +import GHC.Types.Name.Occurrence +import GHC.Types.Module +import GHC.Types.SrcLoc +import GHC.Types.Unique import Util import Maybes import Binary diff --git a/compiler/basicTypes/Name.hs-boot b/compiler/GHC/Types/Name.hs-boot index 54efe686ad..fdd2f62b8d 100644 --- a/compiler/basicTypes/Name.hs-boot +++ b/compiler/GHC/Types/Name.hs-boot @@ -1,4 +1,4 @@ -module Name where +module GHC.Types.Name where import GhcPrelude () diff --git a/compiler/basicTypes/NameCache.hs b/compiler/GHC/Types/Name/Cache.hs index 8b63e3d687..abf7bc89b5 100644 --- a/compiler/basicTypes/NameCache.hs +++ b/compiler/GHC/Types/Name/Cache.hs @@ -2,7 +2,7 @@ {-# LANGUAGE RankNTypes #-} -- | The Name Cache -module NameCache +module GHC.Types.Name.Cache ( lookupOrigNameCache , extendOrigNameCache , extendNameCache @@ -12,9 +12,9 @@ module NameCache import GhcPrelude -import Module -import Name -import UniqSupply +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Unique.Supply import TysWiredIn import Util import Outputable diff --git a/compiler/basicTypes/NameEnv.hs b/compiler/GHC/Types/Name/Env.hs index 6aef33e410..25842ab3f1 100644 --- a/compiler/basicTypes/NameEnv.hs +++ b/compiler/GHC/Types/Name/Env.hs @@ -9,7 +9,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} -module NameEnv ( +module GHC.Types.Name.Env ( -- * Var, Id and TyVar environments (maps) NameEnv, @@ -40,9 +40,9 @@ module NameEnv ( import GhcPrelude import Digraph -import Name -import UniqFM -import UniqDFM +import GHC.Types.Name +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM import Maybes {- @@ -146,8 +146,8 @@ lookupNameEnv_NF env n = expectJust "lookupNameEnv_NF" (lookupNameEnv env n) -- | Deterministic Name Environment -- --- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need --- DNameEnv. +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why +-- we need DNameEnv. type DNameEnv a = UniqDFM a emptyDNameEnv :: DNameEnv a diff --git a/compiler/basicTypes/OccName.hs b/compiler/GHC/Types/Name/Occurrence.hs index 56864e26cf..d57924e121 100644 --- a/compiler/basicTypes/OccName.hs +++ b/compiler/GHC/Types/Name/Occurrence.hs @@ -24,7 +24,7 @@ -- -- * 'Var.Var': see "Var#name_types" -module OccName ( +module GHC.Types.Name.Occurrence ( -- * The 'NameSpace' type NameSpace, -- Abstract @@ -104,13 +104,13 @@ module OccName ( import GhcPrelude import Util -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import FastString import FastStringEnv import Outputable -import Lexeme +import GHC.Utils.Lexeme import Binary import Control.DeepSeq import Data.Char diff --git a/compiler/GHC/Types/Name/Occurrence.hs-boot b/compiler/GHC/Types/Name/Occurrence.hs-boot new file mode 100644 index 0000000000..212b58b8e6 --- /dev/null +++ b/compiler/GHC/Types/Name/Occurrence.hs-boot @@ -0,0 +1,5 @@ +module GHC.Types.Name.Occurrence where + +import GhcPrelude () + +data OccName diff --git a/compiler/basicTypes/RdrName.hs b/compiler/GHC/Types/Name/Reader.hs index d0d12e3607..d183979372 100644 --- a/compiler/basicTypes/RdrName.hs +++ b/compiler/GHC/Types/Name/Reader.hs @@ -22,7 +22,7 @@ -- -- * 'Var.Var': see "Var#name_types" -module RdrName ( +module GHC.Types.Name.Reader ( -- * The main type RdrName(..), -- Constructors exported only to GHC.Iface.Binary @@ -72,20 +72,20 @@ module RdrName ( import GhcPrelude -import Module -import Name -import Avail -import NameSet +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Avail +import GHC.Types.Name.Set import Maybes -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import FastString -import FieldLabel +import GHC.Types.FieldLabel import Outputable -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Util -import NameEnv +import GHC.Types.Name.Env import Data.Data import Data.List( sortBy ) @@ -178,7 +178,7 @@ rdrNameSpace :: RdrName -> NameSpace rdrNameSpace = occNameSpace . rdrNameOcc -- demoteRdrName lowers the NameSpace of RdrName. --- see Note [Demotion] in OccName +-- see Note [Demotion] in GHC.Types.Name.Occurrence demoteRdrName :: RdrName -> Maybe RdrName demoteRdrName (Unqual occ) = fmap Unqual (demoteOccName occ) demoteRdrName (Qual m occ) = fmap (Qual m) (demoteOccName occ) @@ -562,7 +562,7 @@ GlobalRdrEnv will contain an entry like this: "x" |-> GRE x (FldParent T Nothing) LocalDef When -XDuplicateRecordFields is enabled for the module that contains -T, the selector's Name will be mangled (see comments in FieldLabel). +T, the selector's Name will be mangled (see comments in GHC.Types.FieldLabel). Thus we store the actual field label in par_lbl, and the GlobalRdrEnv entry looks like this: diff --git a/compiler/basicTypes/NameSet.hs b/compiler/GHC/Types/Name/Set.hs index 1605deb9af..04a8f1effa 100644 --- a/compiler/basicTypes/NameSet.hs +++ b/compiler/GHC/Types/Name/Set.hs @@ -4,7 +4,7 @@ -} {-# LANGUAGE CPP #-} -module NameSet ( +module GHC.Types.Name.Set ( -- * Names set type NameSet, @@ -35,9 +35,9 @@ module NameSet ( import GhcPrelude -import Name +import GHC.Types.Name import OrdList -import UniqSet +import GHC.Types.Unique.Set import Data.List (sortBy) {- diff --git a/compiler/GHC/Types/Name/Shape.hs b/compiler/GHC/Types/Name/Shape.hs index aa1879220f..39a25c1ad6 100644 --- a/compiler/GHC/Types/Name/Shape.hs +++ b/compiler/GHC/Types/Name/Shape.hs @@ -1,14 +1,15 @@ {-# LANGUAGE CPP #-} -module GHC.Types.Name.Shape( - NameShape(..), - emptyNameShape, - mkNameShape, - extendNameShape, - nameShapeExports, - substNameShape, - maybeSubstNameShape, - ) where +module GHC.Types.Name.Shape + ( NameShape(..) + , emptyNameShape + , mkNameShape + , extendNameShape + , nameShapeExports + , substNameShape + , maybeSubstNameShape + ) +where #include "HsVersions.h" @@ -16,13 +17,13 @@ import GhcPrelude import Outputable import GHC.Driver.Types -import Module -import UniqFM -import Avail -import FieldLabel +import GHC.Types.Module +import GHC.Types.Unique.FM +import GHC.Types.Avail +import GHC.Types.FieldLabel -import Name -import NameEnv +import GHC.Types.Name +import GHC.Types.Name.Env import TcRnMonad import Util import GHC.Iface.Env diff --git a/compiler/GHC/Types/RepType.hs b/compiler/GHC/Types/RepType.hs index 3a76dde256..645d2af7c8 100644 --- a/compiler/GHC/Types/RepType.hs +++ b/compiler/GHC/Types/RepType.hs @@ -25,7 +25,7 @@ module GHC.Types.RepType import GhcPrelude -import BasicTypes (Arity, RepArity) +import GHC.Types.Basic (Arity, RepArity) import GHC.Core.DataCon import Outputable import PrelNames diff --git a/compiler/basicTypes/SrcLoc.hs b/compiler/GHC/Types/SrcLoc.hs index 896168b474..0488d4d882 100644 --- a/compiler/basicTypes/SrcLoc.hs +++ b/compiler/GHC/Types/SrcLoc.hs @@ -15,7 +15,7 @@ -- | This module contains types that relate to the positions of things -- in source files, and allow tagging of those things with locations -module SrcLoc ( +module GHC.Types.SrcLoc ( -- * SrcLoc RealSrcLoc, -- Abstract SrcLoc(..), diff --git a/compiler/basicTypes/Unique.hs b/compiler/GHC/Types/Unique.hs index f6f46914f0..d031f70072 100644 --- a/compiler/basicTypes/Unique.hs +++ b/compiler/GHC/Types/Unique.hs @@ -19,7 +19,7 @@ Haskell). {-# LANGUAGE CPP, BangPatterns, MagicHash #-} -module Unique ( +module GHC.Types.Unique ( -- * Main data types Unique, Uniquable(..), uNIQUE_BITS, @@ -29,21 +29,21 @@ module Unique ( pprUniqueAlways, - mkUniqueGrimily, -- Used in UniqSupply only! - getKey, -- Used in Var, UniqFM, Name only! - mkUnique, unpkUnique, -- Used in GHC.Iface.Binary only + mkUniqueGrimily, + getKey, + mkUnique, unpkUnique, eqUnique, ltUnique, incrUnique, - newTagUnique, -- Used in CgCase + newTagUnique, initTyVarUnique, initExitJoinUnique, nonDetCmpUnique, - isValidKnownKeyUnique, -- Used in PrelInfo.knownKeyNamesOkay + isValidKnownKeyUnique, -- ** Making built-in uniques - -- now all the built-in Uniques (and functions to make them) + -- now all the built-in GHC.Types.Uniques (and functions to make them) -- [the Oh-So-Wonderful Haskell module system wins again...] mkAlphaTyVarUnique, mkPrimOpIdUnique, mkPrimOpWrapperUnique, @@ -77,7 +77,7 @@ module Unique ( import GhcPrelude -import BasicTypes +import GHC.Types.Basic import FastString import Outputable import Util @@ -437,7 +437,7 @@ mkCostCentreUnique :: Int -> Unique mkCostCentreUnique = mkUnique 'C' mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique :: FastString -> Unique --- See Note [The Unique of an OccName] in OccName +-- See Note [The Unique of an OccName] in GHC.Types.Name.Occurrence mkVarOccUnique fs = mkUnique 'i' (uniqueOfFS fs) mkDataOccUnique fs = mkUnique 'd' (uniqueOfFS fs) mkTvOccUnique fs = mkUnique 'v' (uniqueOfFS fs) diff --git a/compiler/utils/UniqDFM.hs b/compiler/GHC/Types/Unique/DFM.hs index f9588e9b0b..21e2f8249b 100644 --- a/compiler/utils/UniqDFM.hs +++ b/compiler/GHC/Types/Unique/DFM.hs @@ -10,7 +10,7 @@ This is very similar to @UniqFM@, the major difference being that the order of folding is not dependent on @Unique@ ordering, giving determinism. Currently the ordering is determined by insertion order. -See Note [Unique Determinism] in Unique for explanation why @Unique@ ordering +See Note [Unique Determinism] in GHC.Types.Unique for explanation why @Unique@ ordering is not deterministic. -} @@ -20,7 +20,7 @@ is not deterministic. {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -Wall #-} -module UniqDFM ( +module GHC.Types.Unique.DFM ( -- * Unique-keyed deterministic mappings UniqDFM, -- abstract type @@ -63,7 +63,7 @@ module UniqDFM ( import GhcPrelude -import Unique ( Uniquable(..), Unique, getKey ) +import GHC.Types.Unique ( Uniquable(..), Unique, getKey ) import Outputable import qualified Data.IntMap as M @@ -72,7 +72,7 @@ import Data.Functor.Classes (Eq1 (..)) import Data.List (sortBy) import Data.Function (on) import qualified Data.Semigroup as Semi -import UniqFM (UniqFM, listToUFM_Directly, nonDetUFMToList, ufmToIntMap) +import GHC.Types.Unique.FM (UniqFM, listToUFM_Directly, nonDetUFMToList, ufmToIntMap) -- Note [Deterministic UniqFM] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -95,7 +95,7 @@ import UniqFM (UniqFM, listToUFM_Directly, nonDetUFMToList, ufmToIntMap) -- the keys. The keys in @UniqFM@ are always @Uniques@, so you end up with -- with a list ordered by @Uniques@. -- The order of @Uniques@ is known to be not stable across rebuilds. --- See Note [Unique Determinism] in Unique. +-- See Note [Unique Determinism] in GHC.Types.Unique. -- -- -- There's more than one way to implement this. The implementation here tags diff --git a/compiler/utils/UniqDSet.hs b/compiler/GHC/Types/Unique/DSet.hs index c2ace5787f..32d32536df 100644 --- a/compiler/utils/UniqDSet.hs +++ b/compiler/GHC/Types/Unique/DSet.hs @@ -4,14 +4,14 @@ -- Specialised deterministic sets, for things with @Uniques@ -- -- Based on 'UniqDFM's (as you would expect). --- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need it. +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need it. -- -- Basically, the things need to be in class 'Uniquable'. {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} -module UniqDSet ( +module GHC.Types.Unique.DSet ( -- * Unique set type UniqDSet, -- type synonym for UniqFM a getUniqDSet, @@ -40,15 +40,15 @@ module UniqDSet ( import GhcPrelude import Outputable -import UniqDFM -import UniqSet -import Unique +import GHC.Types.Unique.DFM +import GHC.Types.Unique.Set +import GHC.Types.Unique import Data.Coerce import Data.Data import qualified Data.Semigroup as Semi --- See Note [UniqSet invariant] in UniqSet.hs for why we want a newtype here. +-- See Note [UniqSet invariant] in GHC.Types.Unique.Set for why we want a newtype here. -- Beyond preserving invariants, we may also want to 'override' typeclass -- instances. @@ -122,7 +122,7 @@ uniqDSetToList = eltsUDFM . getUniqDSet partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a) partitionUniqDSet p = coerce . partitionUDFM p . getUniqDSet --- See Note [UniqSet invariant] in UniqSet.hs +-- See Note [UniqSet invariant] in GHC.Types.Unique.Set mapUniqDSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b mapUniqDSet f = mkUniqDSet . map f . uniqDSetToList diff --git a/compiler/utils/UniqFM.hs b/compiler/GHC/Types/Unique/FM.hs index 19b506e883..01ab645783 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/GHC/Types/Unique/FM.hs @@ -24,7 +24,7 @@ of arguments of combining function. {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wall #-} -module UniqFM ( +module GHC.Types.Unique.FM ( -- * Unique-keyed mappings UniqFM, -- abstract type NonDetUniqFM(..), -- wrapper for opting into nondeterminism @@ -73,7 +73,7 @@ module UniqFM ( import GhcPrelude -import Unique ( Uniquable(..), Unique, getKey ) +import GHC.Types.Unique ( Uniquable(..), Unique, getKey ) import Outputable import qualified Data.IntMap as M @@ -87,7 +87,7 @@ newtype UniqFM ele = UFM (M.IntMap ele) deriving (Data, Eq, Functor) -- Nondeterministic Foldable and Traversable instances are accessible through -- use of the 'NonDetUniqFM' wrapper. - -- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. + -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. emptyUFM :: UniqFM elt emptyUFM = UFM M.empty @@ -338,21 +338,21 @@ nonDetUFMToList (UFM m) = map (\(k, v) -> (getUnique k, v)) $ M.toList m -- nondeterministic. -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. --- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. newtype NonDetUniqFM ele = NonDetUniqFM { getNonDet :: UniqFM ele } deriving (Functor) -- | Inherently nondeterministic. -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. --- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. instance Foldable NonDetUniqFM where foldr f z (NonDetUniqFM (UFM m)) = foldr f z m -- | Inherently nondeterministic. -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. --- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism. +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism. instance Traversable NonDetUniqFM where traverse f (NonDetUniqFM (UFM m)) = NonDetUniqFM . UFM <$> traverse f m diff --git a/compiler/utils/UniqMap.hs b/compiler/GHC/Types/Unique/Map.hs index 1bd51c2b38..5b06864629 100644 --- a/compiler/utils/UniqMap.hs +++ b/compiler/GHC/Types/Unique/Map.hs @@ -9,7 +9,7 @@ -- makes them a much better drop in replacement for 'Data.Map.Map'. -- -- Key preservation is right-biased. -module UniqMap ( +module GHC.Types.Unique.Map ( UniqMap, emptyUniqMap, isNullUniqMap, @@ -46,9 +46,9 @@ module UniqMap ( import GhcPrelude -import UniqFM +import GHC.Types.Unique.FM -import Unique +import GHC.Types.Unique import Outputable import Data.Semigroup as Semi ( Semigroup(..) ) diff --git a/compiler/utils/UniqSet.hs b/compiler/GHC/Types/Unique/Set.hs index 1c45f7485f..1c52a66732 100644 --- a/compiler/utils/UniqSet.hs +++ b/compiler/GHC/Types/Unique/Set.hs @@ -11,7 +11,7 @@ Basically, the things need to be in class @Uniquable@. {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} -module UniqSet ( +module GHC.Types.Unique.Set ( -- * Unique set type UniqSet, -- type synonym for UniqFM a getUniqSet, @@ -48,8 +48,8 @@ module UniqSet ( import GhcPrelude -import UniqFM -import Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique import Data.Coerce import Outputable import Data.Data diff --git a/compiler/basicTypes/UniqSupply.hs b/compiler/GHC/Types/Unique/Supply.hs index fb321454aa..56c85efcce 100644 --- a/compiler/basicTypes/UniqSupply.hs +++ b/compiler/GHC/Types/Unique/Supply.hs @@ -12,7 +12,7 @@ {-# LANGUAGE UnboxedTuples #-} #endif -module UniqSupply ( +module GHC.Types.Unique.Supply ( -- * Main data type UniqSupply, -- Abstractly @@ -35,7 +35,7 @@ module UniqSupply ( import GhcPrelude -import Unique +import GHC.Types.Unique import PlainPanic (panic) import GHC.IO diff --git a/compiler/basicTypes/Var.hs b/compiler/GHC/Types/Var.hs index c8dd8f11a0..267d0fc786 100644 --- a/compiler/basicTypes/Var.hs +++ b/compiler/GHC/Types/Var.hs @@ -34,7 +34,7 @@ -- Local 'Id's and 'Var's are those bound within an expression -- (e.g. by a lambda) or at the top level of the module being compiled. -module Var ( +module GHC.Types.Var ( -- * The main data type and synonyms Var, CoVar, Id, NcId, DictId, DFunId, EvVar, EqVar, EvId, IpId, JoinId, TyVar, TcTyVar, TypeVar, KindVar, TKVar, TyCoVar, @@ -94,12 +94,12 @@ import GhcPrelude import {-# SOURCE #-} GHC.Core.TyCo.Rep( Type, Kind ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr( pprKind ) import {-# SOURCE #-} TcType( TcTyVarDetails, pprTcTyVarDetails, vanillaSkolemTv ) -import {-# SOURCE #-} IdInfo( IdDetails, IdInfo, coVarDetails, isCoVarDetails, - vanillaIdInfo, pprIdDetails ) +import {-# SOURCE #-} GHC.Types.Id.Info( IdDetails, IdInfo, coVarDetails, isCoVarDetails, + vanillaIdInfo, pprIdDetails ) -import Name hiding (varName) -import Unique ( Uniquable, Unique, getKey, getUnique - , mkUniqueGrimily, nonDetCmpUnique ) +import GHC.Types.Name hiding (varName) +import GHC.Types.Unique ( Uniquable, Unique, getKey, getUnique + , mkUniqueGrimily, nonDetCmpUnique ) import Util import Binary import Outputable diff --git a/compiler/basicTypes/Var.hs-boot b/compiler/GHC/Types/Var.hs-boot index 97b4d0348b..bf83f8cda6 100644 --- a/compiler/basicTypes/Var.hs-boot +++ b/compiler/GHC/Types/Var.hs-boot @@ -1,4 +1,4 @@ -module Var where +module GHC.Types.Var where import GhcPrelude () -- We compile this module with -XNoImplicitPrelude (for some diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/GHC/Types/Var/Env.hs index dfdc933b67..fff3dc897d 100644 --- a/compiler/basicTypes/VarEnv.hs +++ b/compiler/GHC/Types/Var/Env.hs @@ -3,7 +3,7 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} -module VarEnv ( +module GHC.Types.Var.Env ( -- * Var, Id and TyVar environments (maps) VarEnv, IdEnv, TyVarEnv, CoVarEnv, TyCoVarEnv, @@ -77,14 +77,14 @@ module VarEnv ( import GhcPrelude import qualified Data.IntMap.Strict as IntMap -- TODO: Move this to UniqFM -import OccName -import Name -import Var -import VarSet -import UniqSet -import UniqFM -import UniqDFM -import Unique +import GHC.Types.Name.Occurrence +import GHC.Types.Name +import GHC.Types.Var as Var +import GHC.Types.Var.Set +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM +import GHC.Types.Unique import Util import Maybes import Outputable @@ -550,7 +550,7 @@ modifyVarEnv_Directly mangle_fn env key Just xx -> addToUFM_Directly env key (mangle_fn xx) -- Deterministic VarEnv --- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need -- DVarEnv. -- | Deterministic Variable Environment diff --git a/compiler/basicTypes/VarSet.hs b/compiler/GHC/Types/Var/Set.hs index 80493ef9d1..5126988a2c 100644 --- a/compiler/basicTypes/VarSet.hs +++ b/compiler/GHC/Types/Var/Set.hs @@ -5,7 +5,7 @@ {-# LANGUAGE CPP #-} -module VarSet ( +module GHC.Types.Var.Set ( -- * Var, Id and TyVar set types VarSet, IdSet, TyVarSet, CoVarSet, TyCoVarSet, @@ -48,19 +48,19 @@ module VarSet ( import GhcPrelude -import Var ( Var, TyVar, CoVar, TyCoVar, Id ) -import Unique -import Name ( Name ) -import UniqSet -import UniqDSet -import UniqFM( disjointUFM, pluralUFM, pprUFM ) -import UniqDFM( disjointUDFM, udfmToUfm, anyUDFM, allUDFM ) +import GHC.Types.Var ( Var, TyVar, CoVar, TyCoVar, Id ) +import GHC.Types.Unique +import GHC.Types.Name ( Name ) +import GHC.Types.Unique.Set +import GHC.Types.Unique.DSet +import GHC.Types.Unique.FM( disjointUFM, pluralUFM, pprUFM ) +import GHC.Types.Unique.DFM( disjointUDFM, udfmToUfm, anyUDFM, allUDFM ) import Outputable (SDoc) -- | A non-deterministic Variable Set -- -- A non-deterministic set of variables. --- See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why it's not -- deterministic and why it matters. Use DVarSet if the set eventually -- gets converted into a list or folded over in a way where the order -- changes the generated code, for example when abstracting variables. @@ -217,7 +217,7 @@ pprVarSet :: VarSet -- ^ The things to be pretty printed pprVarSet = pprUFM . getUniqSet -- Deterministic VarSet --- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need -- DVarSet. -- | Deterministic Variable Set diff --git a/compiler/basicTypes/Lexeme.hs b/compiler/GHC/Utils/Lexeme.hs index 00559ab1c7..2ea773a2f0 100644 --- a/compiler/basicTypes/Lexeme.hs +++ b/compiler/GHC/Utils/Lexeme.hs @@ -4,7 +4,7 @@ -- There is considerable overlap between the logic here and the logic -- in Lexer.x, but sadly there seems to be no way to merge them. -module Lexeme ( +module GHC.Utils.Lexeme ( -- * Lexical characteristics of Haskell names -- | Use these functions to figure what kind of name a 'FastString' diff --git a/compiler/basicTypes/OccName.hs-boot b/compiler/basicTypes/OccName.hs-boot deleted file mode 100644 index 31d77a44a9..0000000000 --- a/compiler/basicTypes/OccName.hs-boot +++ /dev/null @@ -1,5 +0,0 @@ -module OccName where - -import GhcPrelude () - -data OccName diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index f40a0ce14f..6a013a4b0e 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -160,13 +160,10 @@ Library hs-source-dirs: . - basicTypes - cmm iface main parser prelude - profiling typecheck utils @@ -186,26 +183,26 @@ Library GHC.Driver.Backpack.Syntax GHC.Types.Name.Shape GHC.Iface.Rename - Avail + GHC.Types.Avail AsmUtils - BasicTypes + GHC.Types.Basic GHC.Core.ConLike GHC.Core.DataCon GHC.Core.PatSyn - Demand - Cpr + GHC.Types.Demand + GHC.Types.Cpr GHC.Cmm.DebugBlock Exception - FieldLabel + GHC.Types.FieldLabel GHC.Driver.Monad GHC.Driver.Hooks GHC.Driver.Flags GHC.Driver.Ways - Id - IdInfo + GHC.Types.Id + GHC.Types.Id.Info GHC.Core.Predicate - Lexeme - Literal + GHC.Utils.Lexeme + GHC.Types.Literal GHC.Llvm GHC.Llvm.Syntax GHC.Llvm.MetaData @@ -218,21 +215,21 @@ Library GHC.CmmToLlvm.Ppr GHC.CmmToLlvm.Regs GHC.CmmToLlvm.Mangler - MkId - Module - Name - NameEnv - NameSet - OccName - RdrName - NameCache - SrcLoc - UniqSupply - Unique + GHC.Types.Id.Make + GHC.Types.Module + GHC.Types.Name + GHC.Types.Name.Env + GHC.Types.Name.Set + GHC.Types.Name.Occurrence + GHC.Types.Name.Reader + GHC.Types.Name.Cache + GHC.Types.SrcLoc + GHC.Types.Unique.Supply + GHC.Types.Unique UpdateCafInfos - Var - VarEnv - VarSet + GHC.Types.Var + GHC.Types.Var.Env + GHC.Types.Var.Set UnVarGraph GHC.Cmm.BlockId GHC.Cmm.CLabel @@ -359,7 +356,7 @@ Library GHC.Iface.Recomp GHC.IfaceToCore FlagChecker - Annotations + GHC.Types.Annotations GHC.Driver.CmdLine GHC.Driver.CodeOutput Config @@ -407,7 +404,7 @@ Library Parser RdrHsSyn ApiAnnotation - ForeignCall + GHC.Types.ForeignCall KnownUniques PrelInfo PrelNames @@ -416,9 +413,9 @@ Library ToolSettings TysPrim TysWiredIn - CostCentre - CostCentreState - ProfInit + GHC.Types.CostCentre + GHC.Types.CostCentre.State + GHC.Types.CostCentre.Init GHC.Rename.Binds GHC.Rename.Env GHC.Rename.Expr @@ -567,11 +564,11 @@ Library State Stream StringBuffer - UniqDFM - UniqDSet - UniqFM - UniqMap - UniqSet + GHC.Types.Unique.DFM + GHC.Types.Unique.DSet + GHC.Types.Unique.FM + GHC.Types.Unique.Map + GHC.Types.Unique.Set Util GHC.Cmm.Dataflow GHC.Cmm.Dataflow.Block diff --git a/compiler/iface/BinFingerprint.hs b/compiler/iface/BinFingerprint.hs index 1eef4d67b4..51977968db 100644 --- a/compiler/iface/BinFingerprint.hs +++ b/compiler/iface/BinFingerprint.hs @@ -14,7 +14,7 @@ import GhcPrelude import Fingerprint import Binary -import Name +import GHC.Types.Name import PlainPanic import Util diff --git a/compiler/iface/BuildTyCl.hs b/compiler/iface/BuildTyCl.hs index bae7398b1c..e66c1e6fb6 100644 --- a/compiler/iface/BuildTyCl.hs +++ b/compiler/iface/BuildTyCl.hs @@ -25,22 +25,22 @@ import TysWiredIn( isCTupleTyConName ) import TysPrim ( voidPrimTy ) import GHC.Core.DataCon import GHC.Core.PatSyn -import Var -import VarSet -import BasicTypes -import Name -import NameEnv -import MkId +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Basic +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Id.Make import GHC.Core.Class import GHC.Core.TyCon import GHC.Core.Type -import Id +import GHC.Types.Id import TcType -import SrcLoc( SrcSpan, noSrcSpan ) +import GHC.Types.SrcLoc( SrcSpan, noSrcSpan ) import GHC.Driver.Session import TcRnMonad -import UniqSupply +import GHC.Types.Unique.Supply import Util import Outputable @@ -102,7 +102,7 @@ buildDataCon :: FamInstEnvs -> TyConRepName -> [HsSrcBang] -> Maybe [HsImplBang] - -- See Note [Bangs on imported data constructors] in MkId + -- See Note [Bangs on imported data constructors] in GHC.Types.Id.Make -> [FieldLabel] -- Field labels -> [TyVar] -- Universals -> [TyCoVar] -- Existentials diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index 7cac37cb4f..cab88ee5cc 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -13,8 +13,8 @@ import GhcPrelude import Binary import GHC.Driver.Session import GHC.Driver.Types -import Module -import Name +import GHC.Types.Module +import GHC.Types.Name import Fingerprint import BinFingerprint -- import Outputable diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index 118c5a70ba..0096891e54 100644 --- a/compiler/main/ErrUtils.hs +++ b/compiler/main/ErrUtils.hs @@ -71,7 +71,7 @@ import Exception import Outputable import Panic import qualified PprColour as Col -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import GHC.Driver.Session import FastString (unpackFS) import StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) diff --git a/compiler/main/ErrUtils.hs-boot b/compiler/main/ErrUtils.hs-boot index e071d09272..f7f8b12f80 100644 --- a/compiler/main/ErrUtils.hs-boot +++ b/compiler/main/ErrUtils.hs-boot @@ -4,7 +4,7 @@ module ErrUtils where import GhcPrelude import Outputable (SDoc, PprStyle ) -import SrcLoc (SrcSpan) +import GHC.Types.SrcLoc (SrcSpan) import Json import {-# SOURCE #-} GHC.Driver.Session ( DynFlags ) diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs index 8d88f7b097..cb1b1e3c2b 100644 --- a/compiler/main/HeaderInfo.hs +++ b/compiler/main/HeaderInfo.hs @@ -28,10 +28,10 @@ import Parser ( parseHeader ) import Lexer import FastString import GHC.Hs -import Module +import GHC.Types.Module import PrelNames import StringBuffer -import SrcLoc +import GHC.Types.SrcLoc import GHC.Driver.Session import ErrUtils import Util @@ -40,7 +40,7 @@ import Maybes import Bag ( emptyBag, listToBag, unitBag ) import MonadUtils import Exception -import BasicTypes +import GHC.Types.Basic import qualified GHC.LanguageExtensions as LangExt import Control.Monad diff --git a/compiler/main/HscStats.hs b/compiler/main/HscStats.hs index 5c034a373f..67eddf1f2a 100644 --- a/compiler/main/HscStats.hs +++ b/compiler/main/HscStats.hs @@ -15,7 +15,7 @@ import GhcPrelude import Bag import GHC.Hs import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Util import Data.Char diff --git a/compiler/main/StaticPtrTable.hs b/compiler/main/StaticPtrTable.hs index 81a72230f3..24bb7c974f 100644 --- a/compiler/main/StaticPtrTable.hs +++ b/compiler/main/StaticPtrTable.hs @@ -130,10 +130,10 @@ import GHC.Core.Utils (collectMakeStaticArgs) import GHC.Core.DataCon import GHC.Driver.Session import GHC.Driver.Types -import Id +import GHC.Types.Id import GHC.Core.Make (mkStringExprFSWith) -import Module -import Name +import GHC.Types.Module +import GHC.Types.Name import Outputable import GHC.Platform import PrelNames diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index b2b13d424b..ea6eb178ee 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -42,7 +42,7 @@ import GhcPrelude import GHC.Settings -import Module +import GHC.Types.Module import GHC.Driver.Packages import Outputable import ErrUtils diff --git a/compiler/main/SysTools/ExtraObj.hs b/compiler/main/SysTools/ExtraObj.hs index 73b28a368f..27cc4f7aae 100644 --- a/compiler/main/SysTools/ExtraObj.hs +++ b/compiler/main/SysTools/ExtraObj.hs @@ -19,8 +19,8 @@ import GHC.Driver.Session import GHC.Driver.Packages import GHC.Platform import Outputable -import SrcLoc ( noSrcSpan ) -import Module +import GHC.Types.SrcLoc ( noSrcSpan ) +import GHC.Types.Module import Elf import Util import GhcPrelude diff --git a/compiler/main/SysTools/Process.hs b/compiler/main/SysTools/Process.hs index aa5d6617d3..a95d9c958a 100644 --- a/compiler/main/SysTools/Process.hs +++ b/compiler/main/SysTools/Process.hs @@ -18,7 +18,7 @@ import Outputable import Panic import GhcPrelude import Util -import SrcLoc ( SrcLoc, mkSrcLoc, noSrcSpan, mkSrcSpan ) +import GHC.Types.SrcLoc ( SrcLoc, mkSrcLoc, noSrcSpan, mkSrcSpan ) import Control.Concurrent import Data.Char diff --git a/compiler/main/UnitInfo.hs b/compiler/main/UnitInfo.hs index de8c94541a..b1a307a7fe 100644 --- a/compiler/main/UnitInfo.hs +++ b/compiler/main/UnitInfo.hs @@ -37,8 +37,8 @@ import Data.Version import FastString import Outputable -import Module -import Unique +import GHC.Types.Module as Module +import GHC.Types.Unique -- ----------------------------------------------------------------------------- -- Our UnitInfo type is the InstalledPackageInfo from ghc-boot, diff --git a/compiler/main/UpdateCafInfos.hs b/compiler/main/UpdateCafInfos.hs index dd4881ec6e..c8a0e725e3 100644 --- a/compiler/main/UpdateCafInfos.hs +++ b/compiler/main/UpdateCafInfos.hs @@ -9,13 +9,13 @@ import GhcPrelude import GHC.Core import GHC.Driver.Session import GHC.Driver.Types -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.InstEnv -import NameEnv -import NameSet +import GHC.Types.Name.Env +import GHC.Types.Name.Set import Util -import Var +import GHC.Types.Var import Outputable #include "HsVersions.h" diff --git a/compiler/parser/ApiAnnotation.hs b/compiler/parser/ApiAnnotation.hs index 52905902b6..5ad598da94 100644 --- a/compiler/parser/ApiAnnotation.hs +++ b/compiler/parser/ApiAnnotation.hs @@ -15,9 +15,9 @@ module ApiAnnotation ( import GhcPrelude -import RdrName +import GHC.Types.Name.Reader import Outputable -import SrcLoc +import GHC.Types.SrcLoc import qualified Data.Map as Map import Data.Data diff --git a/compiler/parser/HaddockUtils.hs b/compiler/parser/HaddockUtils.hs index b8e0c564a6..73429ec14a 100644 --- a/compiler/parser/HaddockUtils.hs +++ b/compiler/parser/HaddockUtils.hs @@ -5,7 +5,7 @@ module HaddockUtils where import GhcPrelude import GHC.Hs -import SrcLoc +import GHC.Types.SrcLoc import Control.Monad diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 5fa0af85ad..a99a62913e 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -97,7 +97,7 @@ import Bag import Outputable import StringBuffer import FastString -import UniqFM +import GHC.Types.Unique.FM import Util ( readRational, readHexRational ) -- compiler/main @@ -105,11 +105,11 @@ import ErrUtils import GHC.Driver.Session as DynFlags -- compiler/basicTypes -import SrcLoc -import Module -import BasicTypes ( InlineSpec(..), RuleMatchInfo(..), - IntegralLit(..), FractionalLit(..), - SourceText(..) ) +import GHC.Types.SrcLoc +import GHC.Types.Module +import GHC.Types.Basic ( InlineSpec(..), RuleMatchInfo(..), + IntegralLit(..), FractionalLit(..), + SourceText(..) ) -- compiler/parser import Ctype diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y index 88422f9b3f..e87cad6dae 100644 --- a/compiler/parser/Parser.y +++ b/compiler/parser/Parser.y @@ -62,12 +62,12 @@ import Maybes ( isJust, orElse ) import Outputable -- compiler/basicTypes -import RdrName -import OccName ( varName, dataName, tcClsName, tvName, startsWithUnderscore ) -import GHC.Core.DataCon ( DataCon, dataConName ) -import SrcLoc -import Module -import BasicTypes +import GHC.Types.Name.Reader +import GHC.Types.Name.Occurrence ( varName, dataName, tcClsName, tvName, startsWithUnderscore ) +import GHC.Core.DataCon ( DataCon, dataConName ) +import GHC.Types.SrcLoc +import GHC.Types.Module +import GHC.Types.Basic -- compiler/types import GHC.Core.Type ( funTyCon ) @@ -83,7 +83,7 @@ import ApiAnnotation import TcEvidence ( emptyTcEvBinds ) -- compiler/prelude -import ForeignCall +import GHC.Types.ForeignCall import TysPrim ( eqPrimTyCon ) import TysWiredIn ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon, unboxedUnitTyCon, unboxedUnitDataCon, @@ -2188,8 +2188,8 @@ When the user write Zero instead of 'Zero in types, we parse it a HsTyVar ("Zero", TcClsName) instead of HsTyVar ("Zero", DataName). We deal with this in the renamer. If a HsTyVar ("Zero", TcClsName) is not bounded in the type level, then we look for it in the term level (we -change its namespace to DataName, see Note [Demotion] in OccName). And -both become a HsTyVar ("Zero", DataName) after the renamer. +change its namespace to DataName, see Note [Demotion] in GHC.Types.Names.OccName). +And both become a HsTyVar ("Zero", DataName) after the renamer. -} diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs index 599846398b..485d1bf80e 100644 --- a/compiler/parser/RdrHsSyn.hs +++ b/compiler/parser/RdrHsSyn.hs @@ -108,20 +108,20 @@ import GHC.Core.TyCon ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe ) import GHC.Core.DataCon ( DataCon, dataConTyCon ) import GHC.Core.ConLike ( ConLike(..) ) import GHC.Core.Coercion.Axiom ( Role, fsFromRole ) -import RdrName -import Name -import BasicTypes +import GHC.Types.Name.Reader +import GHC.Types.Name +import GHC.Types.Basic import Lexer -import Lexeme ( isLexCon ) +import GHC.Utils.Lexeme ( isLexCon ) import GHC.Core.Type ( TyThing(..), funTyCon ) import TysWiredIn ( cTupleTyConName, tupleTyCon, tupleDataCon, nilDataConName, nilDataConKey, listTyConName, listTyConKey, eqTyCon_RDR, tupleTyConName, cTupleTyConNameArity_maybe ) -import ForeignCall +import GHC.Types.ForeignCall import PrelNames ( allNameStrings ) -import SrcLoc -import Unique ( hasKey ) +import GHC.Types.SrcLoc +import GHC.Types.Unique ( hasKey ) import OrdList ( OrdList, fromOL ) import Bag ( emptyBag, consBag ) import Outputable @@ -2548,7 +2548,7 @@ mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation -- The (Maybe Activation) is because the user can omit -- the activation spec (and usually does) mkInlinePragma src (inl, match_info) mb_act - = InlinePragma { inl_src = src -- Note [Pragma source text] in BasicTypes + = InlinePragma { inl_src = src -- Note [Pragma source text] in GHC.Types.Basic , inl_inline = inl , inl_sat = Nothing , inl_act = act diff --git a/compiler/prelude/KnownUniques.hs b/compiler/prelude/KnownUniques.hs index 1d292d899b..75b6719bba 100644 --- a/compiler/prelude/KnownUniques.hs +++ b/compiler/prelude/KnownUniques.hs @@ -31,11 +31,11 @@ import GhcPrelude import TysWiredIn import GHC.Core.TyCon import GHC.Core.DataCon -import Id -import BasicTypes +import GHC.Types.Id +import GHC.Types.Basic import Outputable -import Unique -import Name +import GHC.Types.Unique +import GHC.Types.Name import Util import Data.Bits @@ -65,7 +65,7 @@ knownUniqueName u = -- tag (used to identify the sum's TypeRep binding). -- -- This layout is chosen to remain compatible with the usual unique allocation --- for wired-in data constructors described in Unique.hs +-- for wired-in data constructors described in GHC.Types.Unique -- -- TyCon for sum of arity k: -- 00000000 kkkkkkkk 11111100 diff --git a/compiler/prelude/KnownUniques.hs-boot b/compiler/prelude/KnownUniques.hs-boot index b217c84aca..b43598cc17 100644 --- a/compiler/prelude/KnownUniques.hs-boot +++ b/compiler/prelude/KnownUniques.hs-boot @@ -1,9 +1,9 @@ module KnownUniques where import GhcPrelude -import Unique -import Name -import BasicTypes +import GHC.Types.Unique +import GHC.Types.Name +import GHC.Types.Basic -- Needed by TysWiredIn knownUniqueName :: Unique -> Maybe Name diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs index 0b7a962f3f..1a47d59e38 100644 --- a/compiler/prelude/PrelInfo.hs +++ b/compiler/prelude/PrelInfo.hs @@ -49,26 +49,26 @@ module PrelInfo ( import GhcPrelude import KnownUniques -import Unique ( isValidKnownKeyUnique ) +import GHC.Types.Unique ( isValidKnownKeyUnique ) import GHC.Core.ConLike ( ConLike(..) ) import THNames ( templateHaskellNames ) import PrelNames import GHC.Core.Op.ConstantFold -import Avail +import GHC.Types.Avail import PrimOp import GHC.Core.DataCon -import Id -import Name -import NameEnv -import MkId +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Id.Make import Outputable import TysPrim import TysWiredIn import GHC.Driver.Types import GHC.Core.Class import GHC.Core.TyCon -import UniqFM +import GHC.Types.Unique.FM import Util import TcTypeNats ( typeNatTyCons ) @@ -89,12 +89,12 @@ Note [About wired-in things] * Wired-in things are Ids\/TyCons that are completely known to the compiler. They are global values in GHC, (e.g. listTyCon :: TyCon). -* A wired in Name contains the thing itself inside the Name: +* A wired-in Name contains the thing itself inside the Name: see Name.wiredInNameTyThing_maybe (E.g. listTyConName contains listTyCon. * The name cache is initialised with (the names of) all wired-in things - (except tuples and sums; see Note [Known-]) + (except tuples and sums; see Note [Infinite families of known-key names]) * The type environment itself contains no wired in things. The type checker sees if the Name is wired in before looking up the name in diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs index e0d957c00a..8452ac734c 100644 --- a/compiler/prelude/PrelNames.hs +++ b/compiler/prelude/PrelNames.hs @@ -139,7 +139,7 @@ this constructor directly (see CorePrep.lookupIntegerSDataConName) When GHC reads the package data base, it (internally only) pretends it has UnitId `integer-wired-in` instead of the actual UnitId (which includes the version number); just like for `base` and other packages, as described in -Note [Wired-in packages] in Module. This is done in Packages.findWiredInPackages. +Note [Wired-in packages] in GHC.Types.Module. This is done in Packages.findWiredInPackages. -} {-# LANGUAGE CPP #-} @@ -160,12 +160,12 @@ module PrelNames ( import GhcPrelude -import Module -import OccName -import RdrName -import Unique -import Name -import SrcLoc +import GHC.Types.Module +import GHC.Types.Name.Occurrence +import GHC.Types.Name.Reader +import GHC.Types.Unique +import GHC.Types.Name +import GHC.Types.SrcLoc import FastString {- diff --git a/compiler/prelude/PrelNames.hs-boot b/compiler/prelude/PrelNames.hs-boot index 0bd74d5577..9906496b37 100644 --- a/compiler/prelude/PrelNames.hs-boot +++ b/compiler/prelude/PrelNames.hs-boot @@ -1,7 +1,7 @@ module PrelNames where -import Module -import Unique +import GHC.Types.Module +import GHC.Types.Unique mAIN :: Module liftedTypeKindTyConKey :: Unique diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs index 96160a27f3..0774edef63 100644 --- a/compiler/prelude/PrimOp.hs +++ b/compiler/prelude/PrimOp.hs @@ -31,22 +31,22 @@ import TysPrim import TysWiredIn import GHC.Cmm.Type -import Demand -import Id ( Id, mkVanillaGlobalWithInfo ) -import IdInfo ( vanillaIdInfo, setCafInfo, CafInfo(NoCafRefs) ) -import Name -import PrelNames ( gHC_PRIMOPWRAPPERS ) +import GHC.Types.Demand +import GHC.Types.Id ( Id, mkVanillaGlobalWithInfo ) +import GHC.Types.Id.Info ( vanillaIdInfo, setCafInfo, CafInfo(NoCafRefs) ) +import GHC.Types.Name +import PrelNames ( gHC_PRIMOPWRAPPERS ) import GHC.Core.TyCon ( TyCon, isPrimTyCon, PrimRep(..) ) import GHC.Core.Type import GHC.Types.RepType ( typePrimRep1, tyConPrimRep1 ) -import BasicTypes ( Arity, Fixity(..), FixityDirection(..), Boxity(..), - SourceText(..) ) -import SrcLoc ( wiredInSrcSpan ) -import ForeignCall ( CLabelString ) -import Unique ( Unique, mkPrimOpIdUnique, mkPrimOpWrapperUnique ) +import GHC.Types.Basic ( Arity, Fixity(..), FixityDirection(..), Boxity(..), + SourceText(..) ) +import GHC.Types.SrcLoc ( wiredInSrcSpan ) +import GHC.Types.ForeignCall ( CLabelString ) +import GHC.Types.Unique ( Unique, mkPrimOpIdUnique, mkPrimOpWrapperUnique ) +import GHC.Types.Module ( UnitId ) import Outputable import FastString -import Module ( UnitId ) {- ************************************************************************ diff --git a/compiler/prelude/THNames.hs b/compiler/prelude/THNames.hs index 7e131aa1ca..e2efbdaa0d 100644 --- a/compiler/prelude/THNames.hs +++ b/compiler/prelude/THNames.hs @@ -9,11 +9,11 @@ module THNames where import GhcPrelude () import PrelNames( mk_known_key_name ) -import Module( Module, mkModuleNameFS, mkModule, thUnitId ) -import Name( Name ) -import OccName( tcName, clsName, dataName, varName ) -import RdrName( RdrName, nameRdrName ) -import Unique +import GHC.Types.Module( Module, mkModuleNameFS, mkModule, thUnitId ) +import GHC.Types.Name( Name ) +import GHC.Types.Name.Occurrence( tcName, clsName, dataName, varName ) +import GHC.Types.Name.Reader( RdrName, nameRdrName ) +import GHC.Types.Unique import FastString -- To add a name, do three things @@ -170,13 +170,13 @@ mkTHModule :: FastString -> Module mkTHModule m = mkModule thUnitId (mkModuleNameFS m) libFun, libTc, thFun, thTc, thCls, thCon, qqFun :: FastString -> Unique -> Name -libFun = mk_known_key_name OccName.varName thLib -libTc = mk_known_key_name OccName.tcName thLib -thFun = mk_known_key_name OccName.varName thSyn -thTc = mk_known_key_name OccName.tcName thSyn -thCls = mk_known_key_name OccName.clsName thSyn -thCon = mk_known_key_name OccName.dataName thSyn -qqFun = mk_known_key_name OccName.varName qqLib +libFun = mk_known_key_name varName thLib +libTc = mk_known_key_name tcName thLib +thFun = mk_known_key_name varName thSyn +thTc = mk_known_key_name tcName thSyn +thCls = mk_known_key_name clsName thSyn +thCon = mk_known_key_name dataName thSyn +qqFun = mk_known_key_name varName qqLib -------------------- TH.Syntax ----------------------- liftClassName :: Name diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs index e9cdb81fc8..422ed27fe1 100644 --- a/compiler/prelude/TysPrim.hs +++ b/compiler/prelude/TysPrim.hs @@ -110,11 +110,11 @@ import {-# SOURCE #-} TysWiredIn , doubleElemRepDataConTy , mkPromotedListTy ) -import Var ( TyVar, mkTyVar ) -import Name +import GHC.Types.Var ( TyVar, mkTyVar ) +import GHC.Types.Name import GHC.Core.TyCon -import SrcLoc -import Unique +import GHC.Types.SrcLoc +import GHC.Types.Unique import PrelNames import FastString import Outputable diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index 908b0e1566..8db8379131 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -16,7 +16,7 @@ module TysWiredIn ( mkWiredInTyConName, -- This is used in TcTypeNats to define the -- built-in functions for evaluation. - mkWiredInIdName, -- used in MkId + mkWiredInIdName, -- used in GHC.Types.Id.Make -- * All wired in things wiredInTyCons, isBuiltInOcc_maybe, @@ -132,7 +132,7 @@ module TysWiredIn ( import GhcPrelude -import {-# SOURCE #-} MkId( mkDataConWorkId, mkDictSelId ) +import {-# SOURCE #-} GHC.Types.Id.Make ( mkDataConWorkId, mkDictSelId ) -- friends: import PrelNames @@ -141,23 +141,23 @@ import {-# SOURCE #-} KnownUniques -- others: import GHC.Core.Coercion.Axiom -import Id +import GHC.Types.Id import Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE, mAX_SUM_SIZE ) -import Module ( Module ) +import GHC.Types.Module ( Module ) import GHC.Core.Type import GHC.Types.RepType import GHC.Core.DataCon import {-# SOURCE #-} GHC.Core.ConLike import GHC.Core.TyCon -import GHC.Core.Class ( Class, mkClass ) -import RdrName -import Name -import NameEnv ( NameEnv, mkNameEnv, lookupNameEnv, lookupNameEnv_NF ) -import NameSet ( NameSet, mkNameSet, elemNameSet ) -import BasicTypes -import ForeignCall -import SrcLoc ( noSrcSpan ) -import Unique +import GHC.Core.Class ( Class, mkClass ) +import GHC.Types.Name.Reader +import GHC.Types.Name as Name +import GHC.Types.Name.Env ( NameEnv, mkNameEnv, lookupNameEnv, lookupNameEnv_NF ) +import GHC.Types.Name.Set ( NameSet, mkNameSet, elemNameSet ) +import GHC.Types.Basic +import GHC.Types.ForeignCall +import GHC.Types.SrcLoc ( noSrcSpan ) +import GHC.Types.Unique import Data.Array import FastString import Outputable diff --git a/compiler/prelude/TysWiredIn.hs-boot b/compiler/prelude/TysWiredIn.hs-boot index 7fe222b825..426c1015a6 100644 --- a/compiler/prelude/TysWiredIn.hs-boot +++ b/compiler/prelude/TysWiredIn.hs-boot @@ -3,8 +3,8 @@ module TysWiredIn where import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import {-# SOURCE #-} GHC.Core.TyCo.Rep (Type, Kind) -import BasicTypes (Arity, TupleSort) -import Name (Name) +import GHC.Types.Basic (Arity, TupleSort) +import GHC.Types.Name (Name) listTyCon :: TyCon typeNatKind, typeSymbolKind :: Type diff --git a/compiler/profiling/NOTES b/compiler/profiling-notes index 824d52b12a..824d52b12a 100644 --- a/compiler/profiling/NOTES +++ b/compiler/profiling-notes diff --git a/compiler/typecheck/ClsInst.hs b/compiler/typecheck/ClsInst.hs index 8669c9d9bb..3c33c59180 100644 --- a/compiler/typecheck/ClsInst.hs +++ b/compiler/typecheck/ClsInst.hs @@ -21,7 +21,7 @@ import TcMType import TcEvidence import GHC.Core.Predicate import GHC.Rename.Env( addUsedGRE ) -import RdrName( lookupGRE_FieldLabel ) +import GHC.Types.Name.Reader( lookupGRE_FieldLabel ) import GHC.Core.InstEnv import Inst( instDFunType ) import FamInst( tcGetFamInstEnvs, tcInstNewTyCon_maybe, tcLookupDataFamInst ) @@ -30,12 +30,12 @@ import TysWiredIn import TysPrim( eqPrimTyCon, eqReprPrimTyCon ) import PrelNames -import Id +import GHC.Types.Id import GHC.Core.Type import GHC.Core.Make ( mkStringExprFS, mkNaturalExpr ) -import Name ( Name, pprDefinedAt ) -import VarEnv ( VarEnv ) +import GHC.Types.Name ( Name, pprDefinedAt ) +import GHC.Types.Var.Env ( VarEnv ) import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Class diff --git a/compiler/typecheck/Constraint.hs b/compiler/typecheck/Constraint.hs index 20a1a7d774..1ca3d4b405 100644 --- a/compiler/typecheck/Constraint.hs +++ b/compiler/typecheck/Constraint.hs @@ -85,7 +85,7 @@ import GHC.Core.Type import GHC.Core.Coercion import GHC.Core.Class import GHC.Core.TyCon -import Var +import GHC.Types.Var import TcType import TcEvidence @@ -94,14 +94,14 @@ import TcOrigin import GHC.Core import GHC.Core.TyCo.Ppr -import OccName +import GHC.Types.Name.Occurrence import FV -import VarSet +import GHC.Types.Var.Set import GHC.Driver.Session -import BasicTypes +import GHC.Types.Basic import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Bag import Util diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index a780f4688e..1e983d0e24 100644 --- a/compiler/typecheck/FamInst.hs +++ b/compiler/typecheck/FamInst.hs @@ -23,24 +23,24 @@ import GHC.Core.Lint import TcEvidence import GHC.Iface.Load import TcRnMonad -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import GHC.Core.TyCon import TcType import GHC.Core.Coercion.Axiom import GHC.Driver.Session -import Module +import GHC.Types.Module import Outputable import Util -import RdrName +import GHC.Types.Name.Reader import GHC.Core.DataCon ( dataConName ) import Maybes import GHC.Core.TyCo.Rep import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Ppr ( pprWithExplicitKindsWhen ) import TcMType -import Name +import GHC.Types.Name import Panic -import VarSet +import GHC.Types.Var.Set import FV import Bag( Bag, unionBags, unitBag ) import Control.Monad diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs index f8cda0f289..42c06183f7 100644 --- a/compiler/typecheck/FunDeps.hs +++ b/compiler/typecheck/FunDeps.hs @@ -21,8 +21,8 @@ module FunDeps ( import GhcPrelude -import Name -import Var +import GHC.Types.Name +import GHC.Types.Var import GHC.Core.Class import GHC.Core.Predicate import GHC.Core.Type @@ -30,14 +30,14 @@ import TcType( transSuperClasses ) import GHC.Core.Coercion.Axiom( TypeEqn ) import GHC.Core.Unify import GHC.Core.InstEnv -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Ppr( pprWithExplicitKindsWhen ) import FV import Outputable import ErrUtils( Validity(..), allValid ) -import SrcLoc +import GHC.Types.SrcLoc import Util import Pair ( Pair(..) ) diff --git a/compiler/typecheck/Inst.hs b/compiler/typecheck/Inst.hs index d8abc88bf0..61e408e33e 100644 --- a/compiler/typecheck/Inst.hs +++ b/compiler/typecheck/Inst.hs @@ -40,7 +40,7 @@ import GhcPrelude import {-# SOURCE #-} TcExpr( tcPolyExpr, tcSyntaxOp ) import {-# SOURCE #-} TcUnify( unifyType, unifyKind ) -import BasicTypes ( IntegralLit(..), SourceText(..) ) +import GHC.Types.Basic ( IntegralLit(..), SourceText(..) ) import FastString import GHC.Hs import TcHsSyn @@ -61,19 +61,19 @@ import GHC.Core.TyCo.Ppr ( debugPprType ) import TcType import GHC.Driver.Types import GHC.Core.Class( Class ) -import MkId( mkDictFunId ) +import GHC.Types.Id.Make( mkDictFunId ) import GHC.Core( Expr(..) ) -- For the Coercion constructor -import Id -import Name -import Var ( EvVar, tyVarName, VarBndr(..) ) +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Var ( EvVar, tyVarName, VarBndr(..) ) import GHC.Core.DataCon -import VarEnv +import GHC.Types.Var.Env import PrelNames -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import GHC.Driver.Session import Util import Outputable -import BasicTypes ( TypeOrKind(..) ) +import GHC.Types.Basic ( TypeOrKind(..) ) import qualified GHC.LanguageExtensions as LangExt import Data.List ( sortBy ) diff --git a/compiler/typecheck/TcAnnotations.hs b/compiler/typecheck/TcAnnotations.hs index 8f5af9743b..dcd78b5d71 100644 --- a/compiler/typecheck/TcAnnotations.hs +++ b/compiler/typecheck/TcAnnotations.hs @@ -13,15 +13,15 @@ module TcAnnotations ( tcAnnotations, annCtxt ) where import GhcPrelude import {-# SOURCE #-} TcSplice ( runAnnotation ) -import Module +import GHC.Types.Module import GHC.Driver.Session import Control.Monad ( when ) import GHC.Hs -import Name -import Annotations +import GHC.Types.Name +import GHC.Types.Annotations import TcRnMonad -import SrcLoc +import GHC.Types.SrcLoc import Outputable import GHC.Driver.Types diff --git a/compiler/typecheck/TcArrows.hs b/compiler/typecheck/TcArrows.hs index 0dd83837e2..1b54417c85 100644 --- a/compiler/typecheck/TcArrows.hs +++ b/compiler/typecheck/TcArrows.hs @@ -28,13 +28,13 @@ import TcRnMonad import TcEnv import TcOrigin import TcEvidence -import Id( mkLocalId ) +import GHC.Types.Id( mkLocalId ) import Inst import TysWiredIn -import VarSet +import GHC.Types.Var.Set import TysPrim -import BasicTypes( Arity ) -import SrcLoc +import GHC.Types.Basic( Arity ) +import GHC.Types.SrcLoc import Outputable import Util diff --git a/compiler/typecheck/TcBackpack.hs b/compiler/typecheck/TcBackpack.hs index 954ee6c24d..ab89e740b4 100644 --- a/compiler/typecheck/TcBackpack.hs +++ b/compiler/typecheck/TcBackpack.hs @@ -19,12 +19,12 @@ module TcBackpack ( import GhcPrelude -import BasicTypes (defaultFixity, TypeOrKind(..)) +import GHC.Types.Basic (defaultFixity, TypeOrKind(..)) import GHC.Driver.Packages import TcRnExports import GHC.Driver.Session import GHC.Hs -import RdrName +import GHC.Types.Name.Reader import TcRnMonad import TcTyDecls import GHC.Core.InstEnv @@ -39,13 +39,13 @@ import TcOrigin import GHC.Iface.Load import GHC.Rename.Names import ErrUtils -import Id -import Module -import Name -import NameEnv -import NameSet -import Avail -import SrcLoc +import GHC.Types.Id +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Avail +import GHC.Types.SrcLoc import GHC.Driver.Types import Outputable import GHC.Core.Type @@ -53,13 +53,13 @@ import FastString import GHC.Rename.Fixity ( lookupFixityRn ) import Maybes import TcEnv -import Var +import GHC.Types.Var import GHC.Iface.Syntax import PrelNames import qualified Data.Map as Map import GHC.Driver.Finder -import UniqDSet +import GHC.Types.Unique.DSet import GHC.Types.Name.Shape import TcErrors import TcUnify diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs index 49b4f92ce1..26e4ade66d 100644 --- a/compiler/typecheck/TcBinds.hs +++ b/compiler/typecheck/TcBinds.hs @@ -21,7 +21,7 @@ import {-# SOURCE #-} TcMatches ( tcGRHSsPat, tcMatchesFun ) import {-# SOURCE #-} TcExpr ( tcMonoExpr ) import {-# SOURCE #-} TcPatSyn ( tcPatSynDecl, tcPatSynBuilderBind ) import GHC.Core (Tickish (..)) -import CostCentre (mkUserCC, CCFlavour(DeclCC)) +import GHC.Types.CostCentre (mkUserCC, CCFlavour(DeclCC)) import GHC.Driver.Session import FastString import GHC.Hs @@ -42,26 +42,26 @@ import TcType import GHC.Core.Type (mkStrLitTy, tidyOpenType, splitTyConApp_maybe, mkCastTy) import TysPrim import TysWiredIn( mkBoxedTupleTy ) -import Id -import Var -import VarSet -import VarEnv( TidyEnv ) -import Module -import Name -import NameSet -import NameEnv -import SrcLoc +import GHC.Types.Id +import GHC.Types.Var as Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env( TidyEnv ) +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.SrcLoc import Bag import ErrUtils import Digraph import Maybes import Util -import BasicTypes +import GHC.Types.Basic import Outputable import PrelNames( ipClassName ) import TcValidity (checkValidType) -import UniqFM -import UniqSet +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import qualified GHC.LanguageExtensions as LangExt import GHC.Core.ConLike diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs index 7dbe32d9c0..fa24829694 100644 --- a/compiler/typecheck/TcCanonical.hs +++ b/compiler/typecheck/TcCanonical.hs @@ -28,17 +28,17 @@ import GHC.Core.TyCon import GHC.Core.TyCo.Rep -- cleverly decomposes types, good for completeness checking import GHC.Core.Coercion import GHC.Core -import Id( idType, mkTemplateLocals ) +import GHC.Types.Id( idType, mkTemplateLocals ) import GHC.Core.FamInstEnv ( FamInstEnvs ) import FamInst ( tcTopNormaliseNewTypeTF_maybe ) -import Var -import VarEnv( mkInScopeSet ) -import VarSet( delVarSetList ) -import OccName ( OccName ) +import GHC.Types.Var +import GHC.Types.Var.Env( mkInScopeSet ) +import GHC.Types.Var.Set( delVarSetList ) +import GHC.Types.Name.Occurrence ( OccName ) import Outputable import GHC.Driver.Session( DynFlags ) -import NameSet -import RdrName +import GHC.Types.Name.Set +import GHC.Types.Name.Reader import GHC.Hs.Types( HsIPName(..) ) import Pair @@ -48,7 +48,7 @@ import MonadUtils import Control.Monad import Data.Maybe ( isJust ) import Data.List ( zip4 ) -import BasicTypes +import GHC.Types.Basic import Data.Bifunctor ( bimap ) import Data.Foldable ( traverse_ ) diff --git a/compiler/typecheck/TcClassDcl.hs b/compiler/typecheck/TcClassDcl.hs index dad787b93a..c705902a10 100644 --- a/compiler/typecheck/TcClassDcl.hs +++ b/compiler/typecheck/TcClassDcl.hs @@ -44,17 +44,17 @@ import GHC.Core.Coercion ( pprCoAxiom ) import GHC.Driver.Session import FamInst import GHC.Core.FamInstEnv -import Id -import Name -import NameEnv -import NameSet -import Var -import VarEnv +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Var +import GHC.Types.Var.Env import Outputable -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.TyCon import Maybes -import BasicTypes +import GHC.Types.Basic import Bag import FastString import BooleanFormula diff --git a/compiler/typecheck/TcDefaults.hs b/compiler/typecheck/TcDefaults.hs index 535f7a7769..e69ac2170d 100644 --- a/compiler/typecheck/TcDefaults.hs +++ b/compiler/typecheck/TcDefaults.hs @@ -20,7 +20,7 @@ import TcSimplify import TcValidity import TcType import PrelNames -import SrcLoc +import GHC.Types.SrcLoc import Outputable import FastString import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs index d002d55f5d..40efd08652 100644 --- a/compiler/typecheck/TcDeriv.hs +++ b/compiler/typecheck/TcDeriv.hs @@ -43,7 +43,7 @@ import GHC.Rename.Names ( extendGlobalRdrEnvRn ) import GHC.Rename.Binds import GHC.Rename.Env import GHC.Rename.Source ( addTcgDUs ) -import Avail +import GHC.Types.Avail import GHC.Core.Unify( tcUnifyTy ) import GHC.Core.Class @@ -51,16 +51,16 @@ import GHC.Core.Type import ErrUtils import GHC.Core.DataCon import Maybes -import RdrName -import Name -import NameSet +import GHC.Types.Name.Reader +import GHC.Types.Name +import GHC.Types.Name.Set as NameSet import GHC.Core.TyCon import TcType -import Var -import VarEnv -import VarSet +import GHC.Types.Var as Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set import PrelNames -import SrcLoc +import GHC.Types.SrcLoc import Util import Outputable import FastString diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs index 4ce31b8918..079414d604 100644 --- a/compiler/typecheck/TcDerivInfer.hs +++ b/compiler/typecheck/TcDerivInfer.hs @@ -16,7 +16,7 @@ module TcDerivInfer (inferConstraints, simplifyInstanceContexts) where import GhcPrelude import Bag -import BasicTypes +import GHC.Types.Basic import GHC.Core.Class import GHC.Core.DataCon import ErrUtils @@ -44,8 +44,8 @@ import TcUnify (buildImplicationFor, checkConstraints) import TysWiredIn (typeToTypeKind) import GHC.Core.Unify (tcUnifyTy) import Util -import Var -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Set import Control.Monad import Control.Monad.Trans.Class (lift) diff --git a/compiler/typecheck/TcDerivUtils.hs b/compiler/typecheck/TcDerivUtils.hs index c998ea0ee9..0f72eea2e2 100644 --- a/compiler/typecheck/TcDerivUtils.hs +++ b/compiler/typecheck/TcDerivUtils.hs @@ -26,7 +26,7 @@ module TcDerivUtils ( import GhcPrelude import Bag -import BasicTypes +import GHC.Types.Basic import GHC.Core.Class import GHC.Core.DataCon import GHC.Driver.Session @@ -35,12 +35,12 @@ import GHC.Driver.Types (lookupFixity, mi_fix) import GHC.Hs import Inst import GHC.Core.InstEnv -import GHC.Iface.Load (loadInterfaceForName) -import Module (getModule) -import Name +import GHC.Iface.Load (loadInterfaceForName) +import GHC.Types.Module (getModule) +import GHC.Types.Name import Outputable import PrelNames -import SrcLoc +import GHC.Types.SrcLoc import TcGenDeriv import TcGenFunctor import TcGenGenerics @@ -52,7 +52,7 @@ import GHC.Core.TyCon import GHC.Core.TyCo.Ppr (pprSourceTyCon) import GHC.Core.Type import Util -import VarSet +import GHC.Types.Var.Set import Control.Monad.Trans.Reader import Data.Maybe diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs index 98fb6a388c..01bff1db4c 100644 --- a/compiler/typecheck/TcEnv.hs +++ b/compiler/typecheck/TcEnv.hs @@ -81,9 +81,9 @@ import TcType import GHC.Iface.Load import PrelNames import TysWiredIn -import Id -import Var -import RdrName +import GHC.Types.Id +import GHC.Types.Var +import GHC.Types.Name.Reader import GHC.Core.InstEnv import GHC.Core.DataCon ( DataCon ) import GHC.Core.PatSyn ( PatSyn ) @@ -92,15 +92,15 @@ import GHC.Core.TyCon import GHC.Core.Type import GHC.Core.Coercion.Axiom import GHC.Core.Class -import Name -import NameSet -import NameEnv -import VarEnv +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env +import GHC.Types.Var.Env import GHC.Driver.Types import GHC.Driver.Session -import SrcLoc -import BasicTypes hiding( SuccessFlag(..) ) -import Module +import GHC.Types.SrcLoc +import GHC.Types.Basic hiding( SuccessFlag(..) ) +import GHC.Types.Module import Outputable import Encoding import FastString diff --git a/compiler/typecheck/TcEnv.hs-boot b/compiler/typecheck/TcEnv.hs-boot index 5e9bfe2039..23278b8d34 100644 --- a/compiler/typecheck/TcEnv.hs-boot +++ b/compiler/typecheck/TcEnv.hs-boot @@ -1,7 +1,7 @@ module TcEnv where import TcRnTypes( TcM ) -import VarEnv( TidyEnv ) +import GHC.Types.Var.Env( TidyEnv ) -- Annoyingly, there's a recursion between tcInitTidyEnv -- (which does zonking and hence needs TcMType) and diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index e889940893..0fbef80ec0 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -32,7 +32,7 @@ import GHC.Core.Coercion import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Ppr ( pprTyVars, pprWithExplicitKindsWhen, pprSourceTyCon, pprWithTYPE ) import GHC.Core.Unify ( tcMatchTys ) -import Module +import GHC.Types.Module import FamInst import GHC.Core.FamInstEnv ( flattenTys ) import Inst @@ -43,22 +43,22 @@ import GHC.Core.DataCon import TcEvidence import TcEvTerm import GHC.Hs.Binds ( PatSynBind(..) ) -import Name -import RdrName ( lookupGRE_Name, GlobalRdrEnv, mkRdrUnqual ) +import GHC.Types.Name +import GHC.Types.Name.Reader ( lookupGRE_Name, GlobalRdrEnv, mkRdrUnqual ) import PrelNames ( typeableClassName ) -import Id -import Var -import VarSet -import VarEnv -import NameSet +import GHC.Types.Id +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env +import GHC.Types.Name.Set import Bag import ErrUtils ( ErrMsg, errDoc, pprLocErrMsg ) -import BasicTypes +import GHC.Types.Basic import GHC.Core.ConLike ( ConLike(..)) import Util import FastString import Outputable -import SrcLoc +import GHC.Types.SrcLoc import GHC.Driver.Session import ListSetOps ( equivClasses ) import Maybes diff --git a/compiler/typecheck/TcEvTerm.hs b/compiler/typecheck/TcEvTerm.hs index ca3d1b3513..74ef0ae0b4 100644 --- a/compiler/typecheck/TcEvTerm.hs +++ b/compiler/typecheck/TcEvTerm.hs @@ -10,15 +10,15 @@ import FastString import GHC.Core.Type import GHC.Core import GHC.Core.Make -import Literal ( Literal(..) ) +import GHC.Types.Literal ( Literal(..) ) import TcEvidence import GHC.Driver.Types import GHC.Driver.Session -import Name -import Module +import GHC.Types.Name +import GHC.Types.Module import GHC.Core.Utils import PrelNames -import SrcLoc +import GHC.Types.SrcLoc -- Used with Opt_DeferTypeErrors -- See Note [Deferring coercion errors to runtime] diff --git a/compiler/typecheck/TcEvidence.hs b/compiler/typecheck/TcEvidence.hs index 9d2661d915..4e89219271 100644 --- a/compiler/typecheck/TcEvidence.hs +++ b/compiler/typecheck/TcEvidence.hs @@ -55,7 +55,7 @@ module TcEvidence ( import GhcPrelude -import Var +import GHC.Types.Var import GHC.Core.Coercion.Axiom import GHC.Core.Coercion import GHC.Core.Ppr () -- Instance OutputableBndr TyVar @@ -65,10 +65,10 @@ import GHC.Core.TyCon import GHC.Core.DataCon( DataCon, dataConWrapId ) import GHC.Core.Class( Class ) import PrelNames -import VarEnv -import VarSet +import GHC.Types.Var.Env +import GHC.Types.Var.Set import GHC.Core.Predicate -import Name +import GHC.Types.Name import Pair import GHC.Core @@ -79,9 +79,9 @@ import Util import Bag import qualified Data.Data as Data import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Data.IORef( IORef ) -import UniqSet +import GHC.Types.Unique.Set {- Note [TcCoercions] @@ -472,7 +472,7 @@ newtype EvBindMap -- let $dNum = GHC.Num.$fNumInt in -- let $dEq = GHC.Classes.$fEqInt in ... -- - -- See Note [Deterministic UniqFM] in UniqDFM for explanation why + -- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why -- @UniqFM@ can lead to nondeterministic order. emptyEvBindMap :: EvBindMap diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs index 4ddcd3d532..718f5a950b 100644 --- a/compiler/typecheck/TcExpr.hs +++ b/compiler/typecheck/TcExpr.hs @@ -32,7 +32,7 @@ import Constraint ( HoleSort(..) ) import TcHsSyn import TcRnMonad import TcUnify -import BasicTypes +import GHC.Types.Basic import Inst import TcBinds ( chooseInferredQuantifiers, tcLocalBinds ) import TcSigs ( tcUserTypeSig, tcInstSig ) @@ -50,37 +50,37 @@ import TcPat import TcMType import TcOrigin import TcType -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.PatSyn -import Name -import NameEnv -import NameSet -import RdrName +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Name.Reader import GHC.Core.TyCon import GHC.Core.TyCo.Rep import GHC.Core.TyCo.Ppr import GHC.Core.TyCo.Subst (substTyWithInScope) import GHC.Core.Type import TcEvidence -import VarSet +import GHC.Types.Var.Set import TysWiredIn import TysPrim( intPrimTy ) import PrimOp( tagToEnumKey ) import PrelNames import GHC.Driver.Session -import SrcLoc +import GHC.Types.SrcLoc import Util -import VarEnv ( emptyTidyEnv, mkInScopeSet ) +import GHC.Types.Var.Env ( emptyTidyEnv, mkInScopeSet ) import ListSetOps import Maybes import Outputable import FastString import Control.Monad import GHC.Core.Class(classTyCon) -import UniqSet ( nonDetEltsUniqSet ) +import GHC.Types.Unique.Set ( nonDetEltsUniqSet ) import qualified GHC.LanguageExtensions as LangExt import Data.Function diff --git a/compiler/typecheck/TcExpr.hs-boot b/compiler/typecheck/TcExpr.hs-boot index 571e707752..6c2c3bb733 100644 --- a/compiler/typecheck/TcExpr.hs-boot +++ b/compiler/typecheck/TcExpr.hs-boot @@ -1,5 +1,5 @@ module TcExpr where -import Name +import GHC.Types.Name import GHC.Hs ( HsExpr, LHsExpr, SyntaxExprRn, SyntaxExprTc ) import TcType ( TcRhoType, TcSigmaType, SyntaxOpType, ExpType, ExpRhoType ) import TcRnTypes( TcM ) diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs index ecad0361d3..762938c971 100644 --- a/compiler/typecheck/TcFlatten.hs +++ b/compiler/typecheck/TcFlatten.hs @@ -24,12 +24,12 @@ import TcEvidence import GHC.Core.TyCon import GHC.Core.TyCo.Rep -- performs delicate algorithm on types import GHC.Core.Coercion -import Var -import VarSet -import VarEnv +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Outputable import TcSMonad as TcS -import BasicTypes( SwapFlag(..) ) +import GHC.Types.Basic( SwapFlag(..) ) import Util import Bag diff --git a/compiler/typecheck/TcForeign.hs b/compiler/typecheck/TcForeign.hs index 40bab48fde..f050d2a992 100644 --- a/compiler/typecheck/TcForeign.hs +++ b/compiler/typecheck/TcForeign.hs @@ -46,11 +46,11 @@ import FamInst import GHC.Core.FamInstEnv import GHC.Core.Coercion import GHC.Core.Type -import ForeignCall +import GHC.Types.ForeignCall import ErrUtils -import Id -import Name -import RdrName +import GHC.Types.Id +import GHC.Types.Name +import GHC.Types.Name.Reader import GHC.Core.DataCon import GHC.Core.TyCon import TcType @@ -58,7 +58,7 @@ import PrelNames import GHC.Driver.Session import Outputable import GHC.Platform -import SrcLoc +import GHC.Types.SrcLoc import Bag import GHC.Driver.Hooks import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs index a9358be9cf..0a2ab47e9b 100644 --- a/compiler/typecheck/TcGenDeriv.hs +++ b/compiler/typecheck/TcGenDeriv.hs @@ -43,10 +43,10 @@ import GhcPrelude import TcRnMonad import GHC.Hs -import RdrName -import BasicTypes +import GHC.Types.Name.Reader +import GHC.Types.Basic import GHC.Core.DataCon -import Name +import GHC.Types.Name import Fingerprint import Encoding @@ -56,9 +56,9 @@ import FamInst import GHC.Core.FamInstEnv import PrelNames import THNames -import MkId ( coerceId ) +import GHC.Types.Id.Make ( coerceId ) import PrimOp -import SrcLoc +import GHC.Types.SrcLoc import GHC.Core.TyCon import TcEnv import TcType @@ -68,12 +68,12 @@ import TysPrim import TysWiredIn import GHC.Core.Type import GHC.Core.Class -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Util -import Var +import GHC.Types.Var import Outputable -import Lexeme +import GHC.Utils.Lexeme import FastString import Pair import Bag diff --git a/compiler/typecheck/TcGenFunctor.hs b/compiler/typecheck/TcGenFunctor.hs index 09f252c4bb..c326754b20 100644 --- a/compiler/typecheck/TcGenFunctor.hs +++ b/compiler/typecheck/TcGenFunctor.hs @@ -29,8 +29,8 @@ import FastString import GHC.Hs import Outputable import PrelNames -import RdrName -import SrcLoc +import GHC.Types.Name.Reader +import GHC.Types.SrcLoc import State import TcGenDeriv import TcType @@ -38,9 +38,9 @@ import GHC.Core.TyCon import GHC.Core.TyCo.Rep import GHC.Core.Type import Util -import Var -import VarSet -import MkId (coerceId) +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Id.Make (coerceId) import TysWiredIn (true_RDR, false_RDR) import Data.Maybe (catMaybes, isJust) diff --git a/compiler/typecheck/TcGenGenerics.hs b/compiler/typecheck/TcGenGenerics.hs index ad7375d2ec..a6193ed7c4 100644 --- a/compiler/typecheck/TcGenGenerics.hs +++ b/compiler/typecheck/TcGenGenerics.hs @@ -27,12 +27,12 @@ import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.FamInstEnv ( FamInst, FamFlavor(..), mkSingleCoAxiom ) import FamInst -import Module ( moduleName, moduleNameFS +import GHC.Types.Module ( moduleName, moduleNameFS , moduleUnitId, unitIdFS, getModule ) import GHC.Iface.Env ( newGlobalBinder ) -import Name hiding ( varName ) -import RdrName -import BasicTypes +import GHC.Types.Name hiding ( varName ) +import GHC.Types.Name.Reader +import GHC.Types.Basic import TysPrim import TysWiredIn import PrelNames @@ -40,10 +40,10 @@ import TcEnv import TcRnMonad import GHC.Driver.Types import ErrUtils( Validity(..), andValid ) -import SrcLoc +import GHC.Types.SrcLoc import Bag -import VarEnv -import VarSet (elemVarSet) +import GHC.Types.Var.Env +import GHC.Types.Var.Set (elemVarSet) import Outputable import FastString import Util diff --git a/compiler/typecheck/TcHoleErrors.hs b/compiler/typecheck/TcHoleErrors.hs index 08b4e7c6fc..00a1a17226 100644 --- a/compiler/typecheck/TcHoleErrors.hs +++ b/compiler/typecheck/TcHoleErrors.hs @@ -26,12 +26,12 @@ import TcEvidence import TcType import GHC.Core.Type import GHC.Core.DataCon -import Name -import RdrName ( pprNameProvenance , GlobalRdrElt (..), globalRdrEnvElts ) +import GHC.Types.Name +import GHC.Types.Name.Reader ( pprNameProvenance , GlobalRdrElt (..), globalRdrEnvElts ) import PrelNames ( gHC_ERR ) -import Id -import VarSet -import VarEnv +import GHC.Types.Id +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Bag import GHC.Core.ConLike ( ConLike(..) ) import Util diff --git a/compiler/typecheck/TcHoleErrors.hs-boot b/compiler/typecheck/TcHoleErrors.hs-boot index a8f5b81c8c..9c5df86489 100644 --- a/compiler/typecheck/TcHoleErrors.hs-boot +++ b/compiler/typecheck/TcHoleErrors.hs-boot @@ -7,7 +7,7 @@ module TcHoleErrors where import TcRnTypes ( TcM ) import Constraint ( Ct, Implication ) import Outputable ( SDoc ) -import VarEnv ( TidyEnv ) +import GHC.Types.Var.Env ( TidyEnv ) findValidHoleFits :: TidyEnv -> [Implication] -> [Ct] -> Ct -> TcM (TidyEnv, SDoc) diff --git a/compiler/typecheck/TcHoleFitTypes.hs b/compiler/typecheck/TcHoleFitTypes.hs index 0748367f43..d27aa8fef7 100644 --- a/compiler/typecheck/TcHoleFitTypes.hs +++ b/compiler/typecheck/TcHoleFitTypes.hs @@ -11,13 +11,13 @@ import TcRnTypes import Constraint import TcType -import RdrName +import GHC.Types.Name.Reader import GHC.Hs.Doc -import Id +import GHC.Types.Id import Outputable -import Name +import GHC.Types.Name import Data.Function ( on ) diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs index 6fd7f6f0be..41e9880fd2 100644 --- a/compiler/typecheck/TcHsSyn.hs +++ b/compiler/typecheck/TcHsSyn.hs @@ -51,8 +51,8 @@ module TcHsSyn ( import GhcPrelude import GHC.Hs -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.Core.Predicate import TcRnMonad import PrelNames @@ -70,18 +70,18 @@ import GHC.Core.Coercion import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Driver.Types -import Name -import NameEnv -import Var -import VarEnv +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Var +import GHC.Types.Var.Env import GHC.Platform -import BasicTypes +import GHC.Types.Basic import Maybes -import SrcLoc +import GHC.Types.SrcLoc import Bag import Outputable import Util -import UniqFM +import GHC.Types.Unique.FM import GHC.Core import {-# SOURCE #-} TcSplice (runTopSplice) diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 9c578949f8..37bfda6e9f 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -90,25 +90,25 @@ import TcType import Inst ( tcInstInvisibleTyBinders, tcInstInvisibleTyBinder ) import GHC.Core.Type import TysPrim -import RdrName( lookupLocalRdrOcc ) -import Var -import VarSet +import GHC.Types.Name.Reader( lookupLocalRdrOcc ) +import GHC.Types.Var +import GHC.Types.Var.Set import GHC.Core.TyCon import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.Class -import Name --- import NameSet -import VarEnv +import GHC.Types.Name +-- import GHC.Types.Name.Set +import GHC.Types.Var.Env import TysWiredIn -import BasicTypes -import SrcLoc +import GHC.Types.Basic +import GHC.Types.SrcLoc import Constants ( mAX_CTUPLE_SIZE ) import ErrUtils( MsgDoc ) -import Unique -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.Set import Util -import UniqSupply +import GHC.Types.Unique.Supply import Outputable import FastString import PrelNames hiding ( wildCardName ) diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs index 386f9b1646..e189c7d896 100644 --- a/compiler/typecheck/TcInstDcls.hs +++ b/compiler/typecheck/TcInstDcls.hs @@ -54,20 +54,20 @@ import GHC.Core.Coercion.Axiom import GHC.Core.DataCon import GHC.Core.ConLike import GHC.Core.Class -import Var -import VarEnv -import VarSet +import GHC.Types.Var as Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set import Bag -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import ErrUtils import FastString -import Id +import GHC.Types.Id import ListSetOps -import Name -import NameSet +import GHC.Types.Name +import GHC.Types.Name.Set import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Util import BooleanFormula ( isUnsatisfied, pprBooleanFormulaNice ) import qualified GHC.LanguageExtensions as LangExt @@ -195,7 +195,7 @@ Instead we use a cunning trick. * ClassOp rules: We give the ClassOp 'op2' a BuiltinRule that extracts the right piece iff its argument satisfies - exprIsConApp_maybe. This is done in MkId mkDictSelId + exprIsConApp_maybe. This is done in GHC.Types.Id.Make.mkDictSelId * We make 'df' CONLIKE, so that shared uses still match; eg let d = df d1 d2 diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs index 4401bb7142..d0f1e0d1b1 100644 --- a/compiler/typecheck/TcInteract.hs +++ b/compiler/typecheck/TcInteract.hs @@ -11,18 +11,18 @@ module TcInteract ( #include "HsVersions.h" import GhcPrelude -import BasicTypes ( SwapFlag(..), isSwapped, - infinity, IntWithInf, intGtLimit ) +import GHC.Types.Basic ( SwapFlag(..), isSwapped, + infinity, IntWithInf, intGtLimit ) import TcCanonical import TcFlatten import TcUnify( canSolveByUnification ) -import VarSet +import GHC.Types.Var.Set import GHC.Core.Type as Type import GHC.Core.Coercion ( BlockSubstFlag(..) ) import GHC.Core.InstEnv ( DFunInstType ) import GHC.Core.Coercion.Axiom ( sfInteractTop, sfInteractInert ) -import Var +import GHC.Types.Var import TcType import PrelNames ( coercibleTyConKey, heqTyConKey, eqTyConKey, ipClassKey ) @@ -48,13 +48,13 @@ import MonadUtils ( concatMapM, foldlM ) import GHC.Core import Data.List( partition, deleteFirstsBy ) -import SrcLoc -import VarEnv +import GHC.Types.SrcLoc +import GHC.Types.Var.Env import Control.Monad import Maybes( isJust ) import Pair (Pair(..)) -import Unique( hasKey ) +import GHC.Types.Unique( hasKey ) import GHC.Driver.Session import Util import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs index 945f42c81d..e234c5195c 100644 --- a/compiler/typecheck/TcMType.hs +++ b/compiler/typecheck/TcMType.hs @@ -104,7 +104,7 @@ import GHC.Core.Type import GHC.Core.TyCon import GHC.Core.Coercion import GHC.Core.Class -import Var +import GHC.Types.Var import GHC.Core.Predicate import TcOrigin @@ -112,23 +112,23 @@ import TcOrigin import TcRnMonad -- TcType, amongst others import Constraint import TcEvidence -import Id -import Name -import VarSet +import GHC.Types.Id as Id +import GHC.Types.Name +import GHC.Types.Var.Set import TysWiredIn import TysPrim -import VarEnv -import NameEnv +import GHC.Types.Var.Env +import GHC.Types.Name.Env import PrelNames import Util import Outputable import FastString import Bag import Pair -import UniqSet +import GHC.Types.Unique.Set import GHC.Driver.Session import qualified GHC.LanguageExtensions as LangExt -import BasicTypes ( TypeOrKind(..) ) +import GHC.Types.Basic ( TypeOrKind(..) ) import Control.Monad import Maybes @@ -1110,7 +1110,7 @@ Note [CandidatesQTvs determinism and order] To achieve that we use deterministic sets of variables that can be converted to lists in a deterministic order. For more information - about deterministic sets see Note [Deterministic UniqFM] in UniqDFM. + about deterministic sets see Note [Deterministic UniqFM] in GHC.Types.Unique.DFM. * Order: as well as being deterministic, we use an accumulating-parameter style for candidateQTyVarsOfType so that we @@ -1549,7 +1549,7 @@ To achieve this CandidatesQTvs is backed by deterministic sets which allows them to be later converted to a list in a deterministic order. For more information about deterministic sets see -Note [Deterministic UniqFM] in UniqDFM. +Note [Deterministic UniqFM] in GHC.Types.Unique.DFM. -} quantifyTyVars diff --git a/compiler/typecheck/TcMatches.hs b/compiler/typecheck/TcMatches.hs index e0304ec6fa..a3f2649039 100644 --- a/compiler/typecheck/TcMatches.hs +++ b/compiler/typecheck/TcMatches.hs @@ -27,7 +27,7 @@ import GhcPrelude import {-# SOURCE #-} TcExpr( tcSyntaxOp, tcInferRhoNC, tcInferRho , tcCheckId, tcMonoExpr, tcMonoExprNC, tcPolyExpr ) -import BasicTypes (LexicalFixity(..)) +import GHC.Types.Basic (LexicalFixity(..)) import GHC.Hs import TcRnMonad import TcEnv @@ -37,15 +37,15 @@ import TcType import TcBinds import TcUnify import TcOrigin -import Name +import GHC.Types.Name import TysWiredIn -import Id +import GHC.Types.Id import GHC.Core.TyCon import TysPrim import TcEvidence import Outputable import Util -import SrcLoc +import GHC.Types.SrcLoc -- Create chunkified tuple tybes for monad comprehensions import GHC.Core.Make diff --git a/compiler/typecheck/TcMatches.hs-boot b/compiler/typecheck/TcMatches.hs-boot index 9c6b914422..ec3ada52a4 100644 --- a/compiler/typecheck/TcMatches.hs-boot +++ b/compiler/typecheck/TcMatches.hs-boot @@ -1,10 +1,10 @@ module TcMatches where -import GHC.Hs ( GRHSs, MatchGroup, LHsExpr ) -import TcEvidence( HsWrapper ) -import Name ( Name ) -import TcType ( ExpSigmaType, TcRhoType ) -import TcRnTypes( TcM ) -import SrcLoc ( Located ) +import GHC.Hs ( GRHSs, MatchGroup, LHsExpr ) +import TcEvidence ( HsWrapper ) +import GHC.Types.Name ( Name ) +import TcType ( ExpSigmaType, TcRhoType ) +import TcRnTypes ( TcM ) +import GHC.Types.SrcLoc ( Located ) import GHC.Hs.Extension ( GhcRn, GhcTcId ) tcGRHSsPat :: GRHSs GhcRn (LHsExpr GhcRn) diff --git a/compiler/typecheck/TcOrigin.hs b/compiler/typecheck/TcOrigin.hs index 9dc137f7d9..502edc6a48 100644 --- a/compiler/typecheck/TcOrigin.hs +++ b/compiler/typecheck/TcOrigin.hs @@ -33,21 +33,21 @@ import TcType import GHC.Hs -import Id +import GHC.Types.Id import GHC.Core.DataCon import GHC.Core.ConLike import GHC.Core.TyCon import GHC.Core.InstEnv import GHC.Core.PatSyn -import Module -import Name -import RdrName +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Reader -import SrcLoc +import GHC.Types.SrcLoc import FastString import Outputable -import BasicTypes +import GHC.Types.Basic {- ********************************************************************* * * diff --git a/compiler/typecheck/TcPat.hs b/compiler/typecheck/TcPat.hs index 855935caba..0d3679eecd 100644 --- a/compiler/typecheck/TcPat.hs +++ b/compiler/typecheck/TcPat.hs @@ -28,10 +28,10 @@ import TcHsSyn import TcSigs( TcPragEnv, lookupPragEnv, addInlinePrags ) import TcRnMonad import Inst -import Id -import Var -import Name -import RdrName +import GHC.Types.Id +import GHC.Types.Var +import GHC.Types.Name +import GHC.Types.Name.Reader import TcEnv import TcMType import TcValidity( arityErr ) @@ -47,10 +47,10 @@ import GHC.Core.DataCon import GHC.Core.PatSyn import GHC.Core.ConLike import PrelNames -import BasicTypes hiding (SuccessFlag(..)) +import GHC.Types.Basic hiding (SuccessFlag(..)) import GHC.Driver.Session -import SrcLoc -import VarSet +import GHC.Types.SrcLoc +import GHC.Types.Var.Set import Util import Outputable import qualified GHC.LanguageExtensions as LangExt @@ -674,7 +674,7 @@ and a case expression case x :: Map (Int, c) w of MapPair m -> ... -As explained by [Wrappers for data instance tycons] in MkIds.hs, the +As explained by [Wrappers for data instance tycons] in GHC.Types.Id.Make, the worker/wrapper types for MapPair are $WMapPair :: forall a b v. Map a (Map a b v) -> Map (a, b) v diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs index a81ae283fd..c2e512df0d 100644 --- a/compiler/typecheck/TcPatSyn.hs +++ b/compiler/typecheck/TcPatSyn.hs @@ -27,19 +27,19 @@ import TcEnv import TcMType import TcHsSyn import TysPrim -import Name -import SrcLoc +import GHC.Types.Name +import GHC.Types.SrcLoc import GHC.Core.PatSyn -import NameSet +import GHC.Types.Name.Set import Panic import Outputable import FastString -import Var -import VarEnv( emptyTidyEnv, mkInScopeSet ) -import Id -import IdInfo( RecSelParent(..), setLevityInfoWithType ) +import GHC.Types.Var +import GHC.Types.Var.Env( emptyTidyEnv, mkInScopeSet ) +import GHC.Types.Id +import GHC.Types.Id.Info( RecSelParent(..), setLevityInfoWithType ) import TcBinds -import BasicTypes +import GHC.Types.Basic import TcSimplify import TcUnify import GHC.Core.Predicate @@ -48,11 +48,11 @@ import TcType import TcEvidence import TcOrigin import BuildTyCl -import VarSet -import MkId +import GHC.Types.Var.Set +import GHC.Types.Id.Make import TcTyDecls import GHC.Core.ConLike -import FieldLabel +import GHC.Types.FieldLabel import Bag import Util import ErrUtils @@ -714,7 +714,7 @@ tcPatSynMatcher (L loc name) lpat ; let matcher_tau = mkVisFunTys [pat_ty, cont_ty, fail_ty] res_ty matcher_sigma = mkInfSigmaTy (rr_tv:res_tv:univ_tvs) req_theta matcher_tau matcher_id = mkExportedVanillaId matcher_name matcher_sigma - -- See Note [Exported LocalIds] in Id + -- See Note [Exported LocalIds] in GHC.Types.Id inst_wrap = mkWpEvApps prov_dicts <.> mkWpTyApps ex_tys cont' = foldl' nlHsApp (mkLHsWrap inst_wrap (nlHsVar cont)) cont_args @@ -803,7 +803,7 @@ mkPatSynBuilderId dir (L _ name) mkVisFunTys arg_tys $ pat_ty builder_id = mkExportedVanillaId builder_name builder_sigma - -- See Note [Exported LocalIds] in Id + -- See Note [Exported LocalIds] in GHC.Types.Id builder_id' = modifyIdInfo (`setLevityInfoWithType` pat_ty) builder_id diff --git a/compiler/typecheck/TcPluginM.hs b/compiler/typecheck/TcPluginM.hs index c85f72c157..339a13dca2 100644 --- a/compiler/typecheck/TcPluginM.hs +++ b/compiler/typecheck/TcPluginM.hs @@ -69,10 +69,10 @@ import TcMType ( TcTyVar, TcType ) import TcEnv ( TcTyThing ) import TcEvidence ( TcCoercion, CoercionHole, EvTerm(..) , EvExpr, EvBind, mkGivenEvBind ) -import Var ( EvVar ) +import GHC.Types.Var ( EvVar ) -import Module -import Name +import GHC.Types.Module +import GHC.Types.Name import GHC.Core.TyCon import GHC.Core.DataCon import GHC.Core.Class @@ -80,10 +80,10 @@ import GHC.Driver.Types import Outputable import GHC.Core.Type import GHC.Core.Coercion ( BlockSubstFlag(..) ) -import Id +import GHC.Types.Id import GHC.Core.InstEnv import FastString -import Unique +import GHC.Types.Unique -- | Perform some IO, typically to interact with an external tool. diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs index 92df16b9c5..91ac66b972 100644 --- a/compiler/typecheck/TcRnDriver.hs +++ b/compiler/typecheck/TcRnDriver.hs @@ -71,7 +71,7 @@ import GHC.Iface.Type ( ShowForAllFlag(..) ) import GHC.Core.PatSyn( pprPatSynType ) import PrelNames import PrelInfo -import RdrName +import GHC.Types.Name.Reader import TcHsSyn import TcExpr import TcRnMonad @@ -108,17 +108,17 @@ import GHC.Rename.Names import GHC.Rename.Env import GHC.Rename.Source import ErrUtils -import Id -import IdInfo( IdDetails(..) ) -import VarEnv -import Module -import UniqFM -import Name -import NameEnv -import NameSet -import Avail +import GHC.Types.Id as Id +import GHC.Types.Id.Info( IdDetails(..) ) +import GHC.Types.Var.Env +import GHC.Types.Module +import GHC.Types.Unique.FM +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Avail import GHC.Core.TyCon -import SrcLoc +import GHC.Types.SrcLoc import GHC.Driver.Types import ListSetOps import Outputable @@ -126,9 +126,9 @@ import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.Type import GHC.Core.Class -import BasicTypes hiding( SuccessFlag(..) ) +import GHC.Types.Basic hiding( SuccessFlag(..) ) import GHC.Core.Coercion.Axiom -import Annotations +import GHC.Types.Annotations import Data.List ( find, sortBy, sort ) import Data.Ord import FastString diff --git a/compiler/typecheck/TcRnDriver.hs-boot b/compiler/typecheck/TcRnDriver.hs-boot index 7cd65195be..a867236c74 100644 --- a/compiler/typecheck/TcRnDriver.hs-boot +++ b/compiler/typecheck/TcRnDriver.hs-boot @@ -4,7 +4,7 @@ import GhcPrelude import GHC.Core.Type(TyThing) import TcRnTypes (TcM) import Outputable (SDoc) -import Name (Name) +import GHC.Types.Name (Name) checkBootDeclM :: Bool -- ^ True <=> an hs-boot file (could also be a sig) -> TyThing -> TyThing -> TcM () diff --git a/compiler/typecheck/TcRnExports.hs b/compiler/typecheck/TcRnExports.hs index fea68a4054..c7c2950e94 100644 --- a/compiler/typecheck/TcRnExports.hs +++ b/compiler/typecheck/TcRnExports.hs @@ -11,7 +11,7 @@ import GhcPrelude import GHC.Hs import PrelNames -import RdrName +import GHC.Types.Name.Reader import TcRnMonad import TcEnv import TcType @@ -19,22 +19,22 @@ import GHC.Rename.Names import GHC.Rename.Env import GHC.Rename.Unbound ( reportUnboundName ) import ErrUtils -import Id -import IdInfo -import Module -import Name -import NameEnv -import NameSet -import Avail +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Avail import GHC.Core.TyCon -import SrcLoc +import GHC.Types.SrcLoc as SrcLoc import GHC.Driver.Types import Outputable import GHC.Core.ConLike import GHC.Core.DataCon import GHC.Core.PatSyn import Maybes -import UniqSet +import GHC.Types.Unique.Set import Util (capitalise) import FastString (fsLit) @@ -681,7 +681,7 @@ check_occs ie occs avails where -- Each Name specified by 'ie', paired with the OccName used to -- refer to it in the GlobalRdrEnv - -- (see Note [Representing fields in AvailInfo] in Avail). + -- (see Note [Representing fields in AvailInfo] in GHC.Types.Avail). -- -- We check for export clashes using the selector Name, but need -- the field label OccName for presenting error messages. diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs index b8761fcdf1..2145b88de9 100644 --- a/compiler/typecheck/TcRnMonad.hs +++ b/compiler/typecheck/TcRnMonad.hs @@ -153,9 +153,9 @@ import TcOrigin import GHC.Hs hiding (LIE) import GHC.Driver.Types -import Module -import RdrName -import Name +import GHC.Types.Module +import GHC.Types.Name.Reader +import GHC.Types.Name import GHC.Core.Type import TcType @@ -163,24 +163,24 @@ import GHC.Core.InstEnv import GHC.Core.FamInstEnv import PrelNames -import Id -import VarSet -import VarEnv +import GHC.Types.Id +import GHC.Types.Var.Set +import GHC.Types.Var.Env import ErrUtils -import SrcLoc -import NameEnv -import NameSet +import GHC.Types.SrcLoc +import GHC.Types.Name.Env +import GHC.Types.Name.Set import Bag import Outputable -import UniqSupply +import GHC.Types.Unique.Supply import GHC.Driver.Session import FastString import Panic import Util -import Annotations -import BasicTypes( TopLevelFlag, TypeOrKind(..) ) +import GHC.Types.Annotations +import GHC.Types.Basic( TopLevelFlag, TypeOrKind(..) ) import Maybes -import CostCentreState +import GHC.Types.CostCentre.State import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index 1f33287bb8..ab4d783143 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -91,29 +91,29 @@ import TcEvidence import GHC.Core.Type import GHC.Core.TyCon ( TyCon, tyConKind ) import GHC.Core.PatSyn ( PatSyn ) -import Id ( idType, idName ) -import FieldLabel ( FieldLabel ) +import GHC.Types.Id ( idType, idName ) +import GHC.Types.FieldLabel ( FieldLabel ) import TcType import Constraint import TcOrigin -import Annotations +import GHC.Types.Annotations import GHC.Core.InstEnv import GHC.Core.FamInstEnv import {-# SOURCE #-} GHC.HsToCore.PmCheck.Types (Deltas) import IOEnv -import RdrName -import Name -import NameEnv -import NameSet -import Avail -import Var -import VarEnv -import Module -import SrcLoc -import VarSet +import GHC.Types.Name.Reader +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set +import GHC.Types.Avail +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Module +import GHC.Types.SrcLoc +import GHC.Types.Var.Set import ErrUtils -import UniqFM -import BasicTypes +import GHC.Types.Unique.FM +import GHC.Types.Basic import Bag import GHC.Driver.Session import Outputable @@ -121,7 +121,7 @@ import ListSetOps import Fingerprint import Util import PrelNames ( isUnboundName ) -import CostCentreState +import GHC.Types.CostCentre.State import Control.Monad (ap) import qualified Control.Monad.Fail as MonadFail diff --git a/compiler/typecheck/TcRnTypes.hs-boot b/compiler/typecheck/TcRnTypes.hs-boot index dda9f627fe..bd7bf07a47 100644 --- a/compiler/typecheck/TcRnTypes.hs-boot +++ b/compiler/typecheck/TcRnTypes.hs-boot @@ -1,7 +1,7 @@ module TcRnTypes where import TcType -import SrcLoc +import GHC.Types.SrcLoc data TcLclEnv diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs index 3c3dadc49e..3e32cda356 100644 --- a/compiler/typecheck/TcRules.hs +++ b/compiler/typecheck/TcRules.hs @@ -29,11 +29,11 @@ import TcUnify( buildImplicationFor ) import TcEvidence( mkTcCoVarCo ) import GHC.Core.Type import GHC.Core.TyCon( isTypeFamilyTyCon ) -import Id -import Var( EvVar ) -import VarSet -import BasicTypes ( RuleName ) -import SrcLoc +import GHC.Types.Id +import GHC.Types.Var( EvVar ) +import GHC.Types.Var.Set +import GHC.Types.Basic ( RuleName ) +import GHC.Types.SrcLoc import Outputable import FastString import Bag diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs index fe74720796..9e934172fc 100644 --- a/compiler/typecheck/TcSMonad.hs +++ b/compiler/typecheck/TcSMonad.hs @@ -154,25 +154,25 @@ import GHC.Core.Class import GHC.Core.TyCon import TcErrors ( solverDepthErrorTcS ) -import Name -import Module ( HasModule, getModule ) -import RdrName ( GlobalRdrEnv, GlobalRdrElt ) +import GHC.Types.Name +import GHC.Types.Module ( HasModule, getModule ) +import GHC.Types.Name.Reader ( GlobalRdrEnv, GlobalRdrElt ) import qualified GHC.Rename.Env as TcM -import Var -import VarEnv -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set import Outputable import Bag -import UniqSupply +import GHC.Types.Unique.Supply import Util import TcRnTypes import TcOrigin import Constraint import GHC.Core.Predicate -import Unique -import UniqFM -import UniqDFM +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM import Maybes import GHC.Core.Map @@ -184,7 +184,7 @@ import Data.List ( partition, mapAccumL ) #if defined(DEBUG) import Digraph -import UniqSet +import GHC.Types.Unique.Set #endif {- diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs index b1ffd46978..fd91b84326 100644 --- a/compiler/typecheck/TcSigs.hs +++ b/compiler/typecheck/TcSigs.hs @@ -42,15 +42,15 @@ import TcEvidence( HsWrapper, (<.>) ) import GHC.Core.Type ( mkTyVarBinders ) import GHC.Driver.Session -import Var ( TyVar, tyVarKind ) -import Id ( Id, idName, idType, idInlinePragma, setInlinePragma, mkLocalId ) +import GHC.Types.Var ( TyVar, tyVarKind ) +import GHC.Types.Id ( Id, idName, idType, idInlinePragma, setInlinePragma, mkLocalId ) import PrelNames( mkUnboundName ) -import BasicTypes -import Module( getModule ) -import Name -import NameEnv +import GHC.Types.Basic +import GHC.Types.Module( getModule ) +import GHC.Types.Name +import GHC.Types.Name.Env import Outputable -import SrcLoc +import GHC.Types.SrcLoc import Util( singleton ) import Maybes( orElse ) import Data.Maybe( mapMaybe ) diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 868be78c68..1ac4c74921 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -31,10 +31,10 @@ import GhcPrelude import Bag import GHC.Core.Class ( Class, classKey, classTyCon ) import GHC.Driver.Session -import Id ( idType, mkLocalId ) +import GHC.Types.Id ( idType, mkLocalId ) import Inst import ListSetOps -import Name +import GHC.Types.Name import Outputable import PrelInfo import PrelNames @@ -53,11 +53,11 @@ import GHC.Core.Type import TysWiredIn ( liftedRepTy ) import GHC.Core.Unify ( tcMatchTyKi ) import Util -import Var -import VarSet -import UniqSet -import BasicTypes ( IntWithInf, intGtLimit ) -import ErrUtils ( emptyMessages ) +import GHC.Types.Var +import GHC.Types.Var.Set +import GHC.Types.Unique.Set +import GHC.Types.Basic ( IntWithInf, intGtLimit ) +import ErrUtils ( emptyMessages ) import qualified GHC.LanguageExtensions as LangExt import Control.Monad diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs index f0cc872d56..d6972f8ec5 100644 --- a/compiler/typecheck/TcSplice.hs +++ b/compiler/typecheck/TcSplice.hs @@ -38,15 +38,15 @@ module TcSplice( import GhcPrelude import GHC.Hs -import Annotations +import GHC.Types.Annotations import GHC.Driver.Finder -import Name +import GHC.Types.Name import TcRnMonad import TcType import Outputable import TcExpr -import SrcLoc +import GHC.Types.SrcLoc import THNames import TcUnify import TcEnv @@ -64,7 +64,7 @@ import GHC.Driver.Main -- These imports are the reason that TcSplice -- is very high up the module hierarchy import GHC.Rename.Splice( traceSplice, SpliceInfo(..)) -import RdrName +import GHC.Types.Name.Reader import GHC.Driver.Types import GHC.ThToHs import GHC.Rename.Expr @@ -75,7 +75,7 @@ import GHC.Rename.Types import TcHsSyn import TcSimplify import GHC.Core.Type as Type -import NameSet +import GHC.Types.Name.Set import TcMType import TcHsType import GHC.IfaceToCore @@ -84,13 +84,13 @@ import FamInst import GHC.Core.FamInstEnv import GHC.Core.InstEnv as InstEnv import Inst -import NameEnv +import GHC.Types.Name.Env import PrelNames import TysWiredIn -import OccName +import GHC.Types.Name.Occurrence as OccName import GHC.Driver.Hooks -import Var -import Module +import GHC.Types.Var +import GHC.Types.Module import GHC.Iface.Load import GHC.Core.Class import GHC.Core.TyCon @@ -99,23 +99,23 @@ import GHC.Core.PatSyn import GHC.Core.ConLike import GHC.Core.DataCon as DataCon import TcEvidence -import Id -import IdInfo +import GHC.Types.Id +import GHC.Types.Id.Info import GHC.HsToCore.Expr import GHC.HsToCore.Monad import GHC.Serialized import ErrUtils import Util -import Unique -import VarSet +import GHC.Types.Unique +import GHC.Types.Var.Set import Data.List ( find ) import Data.Maybe import FastString -import BasicTypes hiding( SuccessFlag(..) ) +import GHC.Types.Basic as BasicTypes hiding( SuccessFlag(..) ) import Maybes( MaybeErr(..) ) import GHC.Driver.Session import Panic -import Lexeme +import GHC.Utils.Lexeme import qualified EnumSet import GHC.Driver.Plugins import Bag diff --git a/compiler/typecheck/TcSplice.hs-boot b/compiler/typecheck/TcSplice.hs-boot index 8cab536a01..f6d57a7552 100644 --- a/compiler/typecheck/TcSplice.hs-boot +++ b/compiler/typecheck/TcSplice.hs-boot @@ -4,11 +4,11 @@ module TcSplice where import GhcPrelude -import Name +import GHC.Types.Name import GHC.Hs.Expr ( PendingRnSplice, DelayedSplice ) import TcRnTypes( TcM , SpliceType ) import TcType ( ExpRhoType ) -import Annotations ( Annotation, CoreAnnTarget ) +import GHC.Types.Annotations ( Annotation, CoreAnnTarget ) import GHC.Hs.Extension ( GhcTcId, GhcRn, GhcPs, GhcTc ) import GHC.Hs ( HsSplice, HsBracket, HsExpr, LHsExpr, LHsType, LPat, diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index e85f471432..df7200abe9 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -57,24 +57,24 @@ import GHC.Core.Class import GHC.Core.Coercion.Axiom import GHC.Core.TyCon import GHC.Core.DataCon -import Id -import Var -import VarEnv -import VarSet -import Module -import Name -import NameSet -import NameEnv +import GHC.Types.Id +import GHC.Types.Var +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Module +import GHC.Types.Name +import GHC.Types.Name.Set +import GHC.Types.Name.Env import Outputable import Maybes import GHC.Core.Unify import Util -import SrcLoc +import GHC.Types.SrcLoc import ListSetOps import GHC.Driver.Session -import Unique +import GHC.Types.Unique import GHC.Core.ConLike( ConLike(..) ) -import BasicTypes +import GHC.Types.Basic import qualified GHC.LanguageExtensions as LangExt import Control.Monad diff --git a/compiler/typecheck/TcTyDecls.hs b/compiler/typecheck/TcTyDecls.hs index aa716d8f47..cd06e79b2d 100644 --- a/compiler/typecheck/TcTyDecls.hs +++ b/compiler/typecheck/TcTyDecls.hs @@ -48,25 +48,25 @@ import GHC.Driver.Types import GHC.Core.TyCon import GHC.Core.ConLike import GHC.Core.DataCon -import Name -import NameEnv -import NameSet hiding (unitFV) -import RdrName ( mkVarUnqual ) -import Id -import IdInfo -import VarEnv -import VarSet +import GHC.Types.Name +import GHC.Types.Name.Env +import GHC.Types.Name.Set hiding (unitFV) +import GHC.Types.Name.Reader ( mkVarUnqual ) +import GHC.Types.Id +import GHC.Types.Id.Info +import GHC.Types.Var.Env +import GHC.Types.Var.Set import GHC.Core.Coercion ( ltRole ) -import BasicTypes -import SrcLoc -import Unique ( mkBuiltinUnique ) +import GHC.Types.Basic +import GHC.Types.SrcLoc +import GHC.Types.Unique ( mkBuiltinUnique ) import Outputable import Util import Maybes import Bag import FastString import FV -import Module +import GHC.Types.Module import Control.Monad diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs index 8ea61cfa36..bc575cef66 100644 --- a/compiler/typecheck/TcType.hs +++ b/compiler/typecheck/TcType.hs @@ -198,9 +198,9 @@ import GHC.Core.TyCo.Subst ( mkTvSubst, substTyWithCoVars ) import GHC.Core.TyCo.FVs import GHC.Core.TyCo.Ppr import GHC.Core.Class -import Var -import ForeignCall -import VarSet +import GHC.Types.Var +import GHC.Types.ForeignCall +import GHC.Types.Var.Set import GHC.Core.Coercion import GHC.Core.Type as Type import GHC.Core.Predicate @@ -210,15 +210,15 @@ import GHC.Core.TyCon -- others: import GHC.Driver.Session import GHC.Core.FVs -import Name -- hiding (varName) +import GHC.Types.Name as Name -- We use this to make dictionaries for type literals. -- Perhaps there's a better way to do this? -import NameSet -import VarEnv +import GHC.Types.Name.Set +import GHC.Types.Var.Env import PrelNames import TysWiredIn( coercibleClass, eqClass, heqClass, unitTyCon, unitTyConKey , listTyCon, constraintKind ) -import BasicTypes +import GHC.Types.Basic import Util import Maybes import ListSetOps ( getNth, findDupsEq ) diff --git a/compiler/typecheck/TcTypeNats.hs b/compiler/typecheck/TcTypeNats.hs index 7fdd9d9028..9dc1176cf2 100644 --- a/compiler/typecheck/TcTypeNats.hs +++ b/compiler/typecheck/TcTypeNats.hs @@ -31,7 +31,7 @@ import GHC.Core.TyCon ( TyCon, FamTyConFlav(..), mkFamilyTyCon import GHC.Core.Coercion ( Role(..) ) import Constraint ( Xi ) import GHC.Core.Coercion.Axiom ( CoAxiomRule(..), BuiltInSynFamily(..), TypeEqn ) -import Name ( Name, BuiltInSyntax(..) ) +import GHC.Types.Name ( Name, BuiltInSyntax(..) ) import TysWiredIn import TysPrim ( mkTemplateAnonTyConBinders ) import PrelNames ( gHC_TYPELITS diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs index d1591ed1bf..4de6e7a6d7 100644 --- a/compiler/typecheck/TcTypeable.hs +++ b/compiler/typecheck/TcTypeable.hs @@ -15,7 +15,7 @@ module TcTypeable(mkTypeableBinds, tyConIsTypeable) where import GhcPrelude import GHC.Platform -import BasicTypes ( Boxity(..), neverInlinePragma, SourceText(..) ) +import GHC.Types.Basic ( Boxity(..), neverInlinePragma, SourceText(..) ) import GHC.Iface.Env( newGlobalBinder ) import GHC.Core.TyCo.Rep( Type(..), TyLit(..) ) import TcEnv @@ -28,16 +28,16 @@ import TysPrim ( primTyCons ) import TysWiredIn ( tupleTyCon, sumTyCon, runtimeRepTyCon , vecCountTyCon, vecElemTyCon , nilDataCon, consDataCon ) -import Name -import Id +import GHC.Types.Name +import GHC.Types.Id import GHC.Core.Type import GHC.Core.TyCon import GHC.Core.DataCon -import Module +import GHC.Types.Module import GHC.Hs import GHC.Driver.Session import Bag -import Var ( VarBndr(..) ) +import GHC.Types.Var ( VarBndr(..) ) import GHC.Core.Map import Constants import Fingerprint(Fingerprint(..), fingerprintString, fingerprintFingerprints) diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs index 6914851144..ae55f7b36c 100644 --- a/compiler/typecheck/TcUnify.hs +++ b/compiler/typecheck/TcUnify.hs @@ -55,17 +55,17 @@ import TcEvidence import Constraint import GHC.Core.Predicate import TcOrigin -import Name( isSystemName ) +import GHC.Types.Name( isSystemName ) import Inst import GHC.Core.TyCon import TysWiredIn import TysPrim( tYPE ) -import Var -import VarSet -import VarEnv +import GHC.Types.Var as Var +import GHC.Types.Var.Set +import GHC.Types.Var.Env import ErrUtils import GHC.Driver.Session -import BasicTypes +import GHC.Types.Basic import Bag import Util import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 3f55d72c5c..289cf83225 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -55,18 +55,18 @@ import FunDeps import GHC.Core.FamInstEnv ( isDominatedBy, injectiveBranches, InjectivityCheckResult(..) ) import FamInst -import Name -import VarEnv -import VarSet -import Var ( VarBndr(..), mkTyVar ) +import GHC.Types.Name +import GHC.Types.Var.Env +import GHC.Types.Var.Set +import GHC.Types.Var ( VarBndr(..), mkTyVar ) import FV import ErrUtils import GHC.Driver.Session import Util import ListSetOps -import SrcLoc +import GHC.Types.SrcLoc import Outputable -import Unique ( mkAlphaTyVarUnique ) +import GHC.Types.Unique ( mkAlphaTyVarUnique ) import Bag ( emptyBag ) import qualified GHC.LanguageExtensions as LangExt diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 16d7ccf37d..bedf380d29 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -64,14 +64,14 @@ module Binary import GhcPrelude -import {-# SOURCE #-} Name (Name) +import {-# SOURCE #-} GHC.Types.Name (Name) import FastString import PlainPanic -import UniqFM +import GHC.Types.Unique.FM import FastMutInt import Fingerprint -import BasicTypes -import SrcLoc +import GHC.Types.Basic +import GHC.Types.SrcLoc import Foreign import Data.Array diff --git a/compiler/utils/BooleanFormula.hs b/compiler/utils/BooleanFormula.hs index a42bb90a1c..76d80eb305 100644 --- a/compiler/utils/BooleanFormula.hs +++ b/compiler/utils/BooleanFormula.hs @@ -24,9 +24,9 @@ import Data.Data import MonadUtils import Outputable import Binary -import SrcLoc -import Unique -import UniqSet +import GHC.Types.SrcLoc +import GHC.Types.Unique +import GHC.Types.Unique.Set ---------------------------------------------------------------------- -- Boolean formula type and smart constructors diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs index e7c838508c..ad5fbf53c3 100644 --- a/compiler/utils/Digraph.hs +++ b/compiler/utils/Digraph.hs @@ -58,8 +58,8 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph hiding (Graph, Edge, transposeG, reachable) import Data.Tree -import Unique -import UniqFM +import GHC.Types.Unique +import GHC.Types.Unique.FM {- ************************************************************************ diff --git a/compiler/utils/FV.hs b/compiler/utils/FV.hs index 667d2a3966..f0a35d4100 100644 --- a/compiler/utils/FV.hs +++ b/compiler/utils/FV.hs @@ -28,8 +28,8 @@ module FV ( import GhcPrelude -import Var -import VarSet +import GHC.Types.Var +import GHC.Types.Var.Set -- | Predicate on possible free variables: returns @True@ iff the variable is -- interesting @@ -40,7 +40,7 @@ type InterestingVarFun = Var -> Bool -- When computing free variables, the order in which you get them affects -- the results of floating and specialization. If you use UniqFM to collect -- them and then turn that into a list, you get them in nondeterministic --- order as described in Note [Deterministic UniqFM] in UniqDFM. +-- order as described in Note [Deterministic UniqFM] in GHC.Types.Unique.DFM. -- A naive algorithm for free variables relies on merging sets of variables. -- Merging costs O(n+m) for UniqFM and for UniqDFM there's an additional log @@ -54,7 +54,7 @@ type FV = InterestingVarFun -- Used for filtering sets as we build them type VarAcc = ([Var], VarSet) -- List to preserve ordering and set to check for membership, -- so that the list doesn't have duplicates -- For explanation of why using `VarSet` is not deterministic see - -- Note [Deterministic UniqFM] in UniqDFM. + -- Note [Deterministic UniqFM] in GHC.Types.Unique.DFM. -- Note [FV naming conventions] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/utils/FastStringEnv.hs b/compiler/utils/FastStringEnv.hs index 1b4af6cee7..bc151f736b 100644 --- a/compiler/utils/FastStringEnv.hs +++ b/compiler/utils/FastStringEnv.hs @@ -29,14 +29,14 @@ module FastStringEnv ( import GhcPrelude -import UniqFM -import UniqDFM +import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM import Maybes import FastString -- | A non-deterministic set of FastStrings. --- See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why it's not -- deterministic and why it matters. Use DFastStringEnv if the set eventually -- gets converted into a list or folded over in a way where the order -- changes the generated code. @@ -82,7 +82,7 @@ filterFsEnv x y = filterUFM x y lookupFsEnv_NF env n = expectJust "lookupFsEnv_NF" (lookupFsEnv env n) -- Deterministic FastStringEnv --- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need +-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need -- DFastStringEnv. type DFastStringEnv a = UniqDFM a -- Domain is FastString diff --git a/compiler/utils/GraphBase.hs b/compiler/utils/GraphBase.hs index a165b003ba..67c362ff00 100644 --- a/compiler/utils/GraphBase.hs +++ b/compiler/utils/GraphBase.hs @@ -14,8 +14,8 @@ where import GhcPrelude -import UniqSet -import UniqFM +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM -- | A fn to check if a node is trivially colorable diff --git a/compiler/utils/GraphColor.hs b/compiler/utils/GraphColor.hs index 70c3f7a7b3..d10b28175c 100644 --- a/compiler/utils/GraphColor.hs +++ b/compiler/utils/GraphColor.hs @@ -20,9 +20,9 @@ import GraphBase import GraphOps import GraphPpr -import Unique -import UniqFM -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.FM +import GHC.Types.Unique.Set import Outputable import Data.Maybe diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs index c7161f0e32..a1693c6a5a 100644 --- a/compiler/utils/GraphOps.hs +++ b/compiler/utils/GraphOps.hs @@ -25,9 +25,9 @@ import GhcPrelude import GraphBase import Outputable -import Unique -import UniqSet -import UniqFM +import GHC.Types.Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM import Data.List hiding (union) import Data.Maybe diff --git a/compiler/utils/GraphPpr.hs b/compiler/utils/GraphPpr.hs index 2210d07273..4327ec881c 100644 --- a/compiler/utils/GraphPpr.hs +++ b/compiler/utils/GraphPpr.hs @@ -12,9 +12,9 @@ import GhcPrelude import GraphBase import Outputable -import Unique -import UniqSet -import UniqFM +import GHC.Types.Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique.FM import Data.List (mapAccumL) import Data.Maybe diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs index 8067123211..fd6f6722cd 100644 --- a/compiler/utils/IOEnv.hs +++ b/compiler/utils/IOEnv.hs @@ -35,7 +35,7 @@ import GhcPrelude import GHC.Driver.Session import Exception -import Module +import GHC.Types.Module import Panic import Data.IORef ( IORef, newIORef, readIORef, writeIORef, modifyIORef, diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index 6f6a335ed7..c23f6ed180 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -99,8 +99,8 @@ import {-# SOURCE #-} GHC.Driver.Session , pprUserLength, pprCols , unsafeGlobalDynFlags, initSDocContext ) -import {-# SOURCE #-} Module( UnitId, Module, ModuleName, moduleName ) -import {-# SOURCE #-} OccName( OccName ) +import {-# SOURCE #-} GHC.Types.Module( UnitId, Module, ModuleName, moduleName ) +import {-# SOURCE #-} GHC.Types.Name.Occurrence( OccName ) import BufWrite (BufHandle) import FastString diff --git a/compiler/utils/TrieMap.hs b/compiler/utils/TrieMap.hs index 53bb06c4f9..815a060a0c 100644 --- a/compiler/utils/TrieMap.hs +++ b/compiler/utils/TrieMap.hs @@ -31,9 +31,9 @@ module TrieMap( import GhcPrelude -import Literal -import UniqDFM -import Unique( Unique ) +import GHC.Types.Literal +import GHC.Types.Unique.DFM +import GHC.Types.Unique( Unique ) import qualified Data.Map as Map import qualified Data.IntMap as IntMap @@ -198,7 +198,7 @@ solve_simple_wanteds it's merged with other WantedConstraints. We want the conversion to a bag to be deterministic. For that purpose we use UniqDFM instead of UniqFM to implement the TrieMap. -See Note [Deterministic UniqFM] in UniqDFM for more details on how it's made +See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for more details on how it's made deterministic. -} diff --git a/compiler/utils/UnVarGraph.hs b/compiler/utils/UnVarGraph.hs index a2f3c687bb..20eff96c2c 100644 --- a/compiler/utils/UnVarGraph.hs +++ b/compiler/utils/UnVarGraph.hs @@ -30,12 +30,12 @@ module UnVarGraph import GhcPrelude -import Id -import VarEnv -import UniqFM +import GHC.Types.Id +import GHC.Types.Var.Env +import GHC.Types.Unique.FM import Outputable import Bag -import Unique +import GHC.Types.Unique import qualified Data.IntSet as S diff --git a/docs/rts/rts.tex b/docs/rts/rts.tex index b6f40cca24..6a653183b4 100644 --- a/docs/rts/rts.tex +++ b/docs/rts/rts.tex @@ -1515,7 +1515,7 @@ value(s). \item[Selected] Is this category selected (-1 == not memoised, selected? 0 or 1) \item[Kind] -One of the following values (defined in CostCentre.lh): +One of the following values (defined in GHC.Types.CostCentre): \begin{description} \item[@CON_K@] diff --git a/ghc/GHCi/Leak.hs b/ghc/GHCi/Leak.hs index 61a12c9a9b..5dcd9ab80d 100644 --- a/ghc/GHCi/Leak.hs +++ b/ghc/GHCi/Leak.hs @@ -17,7 +17,7 @@ import GHC.Platform (target32Bit) import Prelude import System.Mem import System.Mem.Weak -import UniqDFM +import GHC.Types.Unique.DFM -- Checking for space leaks in GHCi. See #15111, and the -- -fghci-leak-check flag. diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 67903c80bf..ec70fc037d 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -55,15 +55,15 @@ import GHC.Hs import GHC.Driver.Types ( tyThingParent_maybe, handleFlagWarnings, getSafeMode, hsc_IC, setInteractivePrintName, hsc_dflags, msObjFilePath, runInteractiveHsc, hsc_dynLinker, hsc_interp ) -import Module -import Name +import GHC.Types.Module +import GHC.Types.Name import GHC.Driver.Packages ( trusted, getPackageDetails, getInstalledPackageDetails, listVisibleModuleNames, pprFlag ) import GHC.Iface.Syntax ( showToHeader ) import GHC.Core.Ppr.TyThing import PrelNames -import RdrName ( getGRE_NameQualifier_maybes, getRdrName ) -import SrcLoc +import GHC.Types.Name.Reader as RdrName ( getGRE_NameQualifier_maybes, getRdrName ) +import GHC.Types.SrcLoc as SrcLoc import qualified Lexer import StringBuffer @@ -72,14 +72,14 @@ import Outputable hiding ( printForUser, printForUserPartWay ) import GHC.Runtime.Loader ( initializePlugins ) -- Other random utilities -import BasicTypes hiding ( isTopLevel ) +import GHC.Types.Basic hiding ( isTopLevel ) import Config import Digraph import Encoding import FastString import GHC.Runtime.Linker import Maybes ( orElse, expectJust ) -import NameSet +import GHC.Types.Name.Set import Panic hiding ( showException ) import Util import qualified GHC.LanguageExtensions as LangExt diff --git a/ghc/GHCi/UI/Info.hs b/ghc/GHCi/UI/Info.hs index 290a11ff2a..bf941a208d 100644 --- a/ghc/GHCi/UI/Info.hs +++ b/ghc/GHCi/UI/Info.hs @@ -37,12 +37,12 @@ import GHC.Driver.Session (HasDynFlags(..)) import FastString import GHC import GHC.Driver.Monad -import Name -import NameSet +import GHC.Types.Name +import GHC.Types.Name.Set import Outputable -import SrcLoc +import GHC.Types.SrcLoc import TcHsSyn -import Var +import GHC.Types.Var -- | Info about a module. This information is generated every time a -- module is loaded. diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 675b92babe..94d5b8bf91 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -40,13 +40,13 @@ import qualified GHC import GHC.Driver.Monad hiding (liftIO) import Outputable hiding (printForUser, printForUserPartWay) import qualified Outputable -import OccName +import GHC.Types.Name.Occurrence import GHC.Driver.Session import FastString import GHC.Driver.Types -import SrcLoc -import Module -import RdrName (mkOrig) +import GHC.Types.SrcLoc +import GHC.Types.Module +import GHC.Types.Name.Reader as RdrName (mkOrig) import PrelNames (gHC_GHCI_HELPERS) import GHC.Runtime.Interpreter import GHCi.RemoteTypes diff --git a/ghc/GHCi/UI/Tags.hs b/ghc/GHCi/UI/Tags.hs index 8ab9a3b438..155a63bf5a 100644 --- a/ghc/GHCi/UI/Tags.hs +++ b/ghc/GHCi/UI/Tags.hs @@ -20,8 +20,8 @@ import Outputable -- ToDo: figure out whether we need these, and put something appropriate -- into the GHC API instead -import Name (nameOccName) -import OccName (pprOccName) +import GHC.Types.Name (nameOccName) +import GHC.Types.Name.Occurrence (pprOccName) import GHC.Core.ConLike import MonadUtils diff --git a/ghc/Main.hs b/ghc/Main.hs index 1ad2a26e86..3cec5b6191 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -39,7 +39,7 @@ import GHC.Driver.Plugins #if defined(HAVE_INTERNAL_INTERPRETER) import GHC.Runtime.Loader ( initializePlugins ) #endif -import Module ( ModuleName ) +import GHC.Types.Module ( ModuleName, mkModuleName ) -- Various other random stuff that we need @@ -51,22 +51,21 @@ import Constants import GHC.Driver.Types import GHC.Driver.Packages ( pprPackages, pprPackagesSimple ) import GHC.Driver.Phases -import BasicTypes ( failed ) +import GHC.Types.Basic ( failed ) import GHC.Driver.Session hiding (WarnReason(..)) import ErrUtils import FastString import Outputable import SysTools.BaseDir import SysTools.Settings -import SrcLoc +import GHC.Types.SrcLoc import Util import Panic -import UniqSupply +import GHC.Types.Unique.Supply import MonadUtils ( liftIO ) -- Imports for --abi-hash -import GHC.Iface.Load ( loadUserInterface ) -import Module ( mkModuleName ) +import GHC.Iface.Load ( loadUserInterface ) import GHC.Driver.Finder ( findImportedModule, cannotFindModule ) import TcRnMonad ( initIfaceCheck ) import Binary ( openBinMem, put_ ) diff --git a/libraries/ghc-prim/GHC/Magic.hs b/libraries/ghc-prim/GHC/Magic.hs index d973aceb9e..77cfd00a54 100644 --- a/libraries/ghc-prim/GHC/Magic.hs +++ b/libraries/ghc-prim/GHC/Magic.hs @@ -27,7 +27,7 @@ module GHC.Magic ( inline, noinline, lazy, oneShot, runRW# ) where -------------------------------------------------- --- See Note [magicIds] in MkId.hs +-- See Note [magicIds] in GHC.Types.Id.Make -------------------------------------------------- -- Here import TYPE explicitly from GHC.Types and not from GHC.Prim. This is @@ -88,7 +88,7 @@ noinline x = x lazy :: a -> a lazy x = x -- Implementation note: its strictness and unfolding are over-ridden --- by the definition in MkId.hs; in both cases to nothing at all. +-- by the definition in GHC.Types.Id.Make; in both cases to nothing at all. -- That way, 'lazy' does not get inlined, and the strictness analyser -- sees it as lazy. Then the worker/wrapper phase inlines it. -- Result: happiness @@ -109,7 +109,7 @@ oneShot :: forall (q :: RuntimeRep) (r :: RuntimeRep) (a :: TYPE q) (b :: TYPE r). (a -> b) -> a -> b oneShot f = f --- Implementation note: This is wired in in MkId.hs, so the code here is +-- Implementation note: This is wired in in GHC.Types.Id.Make, so the code here is -- mostly there to have a place for the documentation. -- | Apply a function to a @'State#' 'RealWorld'@ token. When manually applying diff --git a/testsuite/tests/annotations/should_run/annrun01.hs b/testsuite/tests/annotations/should_run/annrun01.hs index fd2c7bc415..4a587afddc 100644 --- a/testsuite/tests/annotations/should_run/annrun01.hs +++ b/testsuite/tests/annotations/should_run/annrun01.hs @@ -6,7 +6,7 @@ import GHC import MonadUtils ( liftIO ) import Data.Maybe import GHC.Driver.Session ( defaultFatalMessager, defaultFlushOut ) -import Annotations ( AnnTarget(..), CoreAnnTarget ) +import GHC.Types.Annotations ( AnnTarget(..), CoreAnnTarget ) import GHC.Serialized ( deserializeWithData ) import Panic diff --git a/testsuite/tests/callarity/unittest/CallArity1.hs b/testsuite/tests/callarity/unittest/CallArity1.hs index 60afe5be05..c42232b5dd 100644 --- a/testsuite/tests/callarity/unittest/CallArity1.hs +++ b/testsuite/tests/callarity/unittest/CallArity1.hs @@ -1,25 +1,25 @@ {-# LANGUAGE TupleSections #-} import GHC.Core import GHC.Core.Utils -import Id +import GHC.Types.Id import GHC.Core.Type import GHC.Core.Make import GHC.Core.Op.CallArity (callArityRHS) -import MkId +import GHC.Types.Id.Make import SysTools import GHC.Driver.Session import ErrUtils import Outputable import TysWiredIn -import Literal +import GHC.Types.Literal import GHC import Control.Monad import Control.Monad.IO.Class import System.Environment( getArgs ) -import VarSet +import GHC.Types.Var.Set import GHC.Core.Ppr -import Unique -import UniqSet +import GHC.Types.Unique +import GHC.Types.Unique.Set import GHC.Core.Lint import FastString diff --git a/testsuite/tests/determinism/determ002/A.hs b/testsuite/tests/determinism/determ002/A.hs index 9a88f2c319..3ca3e8bc95 100644 --- a/testsuite/tests/determinism/determ002/A.hs +++ b/testsuite/tests/determinism/determ002/A.hs @@ -2,7 +2,7 @@ module A where -- This is a repro for the issue where to fingerprint a record, field labels -- were pulled from FastStringEnv in the order of Uniques which are known --- to have arbitrary order - see Note [Unique Determinism] in Unique. +-- to have arbitrary order - see Note [Unique Determinism] in GHC.Types.Unique. data B = C { e :: () diff --git a/testsuite/tests/ghc-api/T11579.hs b/testsuite/tests/ghc-api/T11579.hs index 493823b843..418057120c 100644 --- a/testsuite/tests/ghc-api/T11579.hs +++ b/testsuite/tests/ghc-api/T11579.hs @@ -4,7 +4,7 @@ import FastString import GHC import StringBuffer import Lexer -import SrcLoc +import GHC.Types.SrcLoc main :: IO () main = do diff --git a/testsuite/tests/ghc-api/T4891/T4891.hs b/testsuite/tests/ghc-api/T4891/T4891.hs index 7ef32aae02..f612093122 100644 --- a/testsuite/tests/ghc-api/T4891/T4891.hs +++ b/testsuite/tests/ghc-api/T4891/T4891.hs @@ -15,7 +15,7 @@ import GHC.Core.Type import TcRnMonad import TcType import Control.Applicative -import Name (getOccString) +import GHC.Types.Name (getOccString) import Unsafe.Coerce import Control.Monad import Data.Maybe diff --git a/testsuite/tests/ghc-api/T8628.hs b/testsuite/tests/ghc-api/T8628.hs index 983adf8636..c3461b2eb7 100644 --- a/testsuite/tests/ghc-api/T8628.hs +++ b/testsuite/tests/ghc-api/T8628.hs @@ -4,7 +4,7 @@ import System.IO import GHC.Driver.Session import GHC import Exception -import Module +import GHC.Types.Module import FastString import MonadUtils import Outputable diff --git a/testsuite/tests/ghc-api/T9595.hs b/testsuite/tests/ghc-api/T9595.hs index a4c3dea7e4..808fd8e79c 100644 --- a/testsuite/tests/ghc-api/T9595.hs +++ b/testsuite/tests/ghc-api/T9595.hs @@ -6,7 +6,7 @@ import GHC.Driver.Monad import Outputable import System.Environment import GHC.Driver.Session -import Module +import GHC.Types.Module main = do [libdir] <- getArgs diff --git a/testsuite/tests/ghc-api/annotations-literals/parsed.hs b/testsuite/tests/ghc-api/annotations-literals/parsed.hs index 352aae6e17..56add861ad 100644 --- a/testsuite/tests/ghc-api/annotations-literals/parsed.hs +++ b/testsuite/tests/ghc-api/annotations-literals/parsed.hs @@ -3,7 +3,7 @@ -- argument. module Main where -import BasicTypes +import GHC.Types.Basic import Data.Data import Data.List (intercalate) import System.IO diff --git a/testsuite/tests/ghc-api/annotations/CheckUtils.hs b/testsuite/tests/ghc-api/annotations/CheckUtils.hs index a43348bcda..473ded85ef 100644 --- a/testsuite/tests/ghc-api/annotations/CheckUtils.hs +++ b/testsuite/tests/ghc-api/annotations/CheckUtils.hs @@ -8,7 +8,7 @@ import Data.Data import Data.List import System.IO import GHC -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import MonadUtils import Outputable diff --git a/testsuite/tests/ghc-api/annotations/listcomps.hs b/testsuite/tests/ghc-api/annotations/listcomps.hs index 5050a290c9..9f8fb4e6b4 100644 --- a/testsuite/tests/ghc-api/annotations/listcomps.hs +++ b/testsuite/tests/ghc-api/annotations/listcomps.hs @@ -9,7 +9,7 @@ import Data.Data import Data.List (intercalate) import System.IO import GHC -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import MonadUtils import Outputable diff --git a/testsuite/tests/ghc-api/annotations/parseTree.hs b/testsuite/tests/ghc-api/annotations/parseTree.hs index be72c7f195..af2aeb6cb5 100644 --- a/testsuite/tests/ghc-api/annotations/parseTree.hs +++ b/testsuite/tests/ghc-api/annotations/parseTree.hs @@ -9,7 +9,7 @@ import Data.Data import Data.List (intercalate) import System.IO import GHC -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import MonadUtils import Outputable diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs index 698d93a6e2..02ce817566 100644 --- a/testsuite/tests/ghc-api/annotations/stringSource.hs +++ b/testsuite/tests/ghc-api/annotations/stringSource.hs @@ -11,10 +11,10 @@ import Data.Data import Data.List (intercalate) import System.IO import GHC -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import MonadUtils import Outputable import GHC.Hs.Decls diff --git a/testsuite/tests/ghc-api/annotations/t11430.hs b/testsuite/tests/ghc-api/annotations/t11430.hs index f1022805cf..aa51c4118e 100644 --- a/testsuite/tests/ghc-api/annotations/t11430.hs +++ b/testsuite/tests/ghc-api/annotations/t11430.hs @@ -11,10 +11,10 @@ import Data.Data hiding (Fixity) import Data.List (intercalate) import System.IO import GHC -import BasicTypes +import GHC.Types.Basic import GHC.Driver.Session import FastString -import ForeignCall +import GHC.Types.ForeignCall import MonadUtils import Outputable import GHC.Hs.Decls diff --git a/testsuite/tests/ghc-api/apirecomp001/myghc.hs b/testsuite/tests/ghc-api/apirecomp001/myghc.hs index fba7dd3d48..8c6f7b867b 100644 --- a/testsuite/tests/ghc-api/apirecomp001/myghc.hs +++ b/testsuite/tests/ghc-api/apirecomp001/myghc.hs @@ -12,7 +12,7 @@ module Main where import GHC import GHC.Driver.Session import MonadUtils ( MonadIO(..) ) -import BasicTypes ( failed ) +import GHC.Types.Basic ( failed ) import Bag ( bagToList ) import System.Environment import Control.Monad diff --git a/testsuite/tests/ghc-api/show-srcspan/showsrcspan.hs b/testsuite/tests/ghc-api/show-srcspan/showsrcspan.hs index bf73b59f18..9a2993f7a8 100644 --- a/testsuite/tests/ghc-api/show-srcspan/showsrcspan.hs +++ b/testsuite/tests/ghc-api/show-srcspan/showsrcspan.hs @@ -4,7 +4,7 @@ import Data.Data import System.IO import GHC import FastString -import SrcLoc +import GHC.Types.SrcLoc import MonadUtils import Outputable import Bag (filterBag,isEmptyBag) diff --git a/testsuite/tests/hiefile/should_run/PatTypes.hs b/testsuite/tests/hiefile/should_run/PatTypes.hs index 5d67639339..c38cacab80 100644 --- a/testsuite/tests/hiefile/should_run/PatTypes.hs +++ b/testsuite/tests/hiefile/should_run/PatTypes.hs @@ -3,10 +3,10 @@ module Main where import System.Environment -import NameCache -import SrcLoc -import UniqSupply -import Name +import GHC.Types.Name.Cache +import GHC.Types.SrcLoc +import GHC.Types.Unique.Supply +import GHC.Types.Name import GHC.Iface.Ext.Binary import GHC.Iface.Ext.Types diff --git a/testsuite/tests/package/all.T b/testsuite/tests/package/all.T index 8fe654fb7d..6aebce6ce5 100644 --- a/testsuite/tests/package/all.T +++ b/testsuite/tests/package/all.T @@ -16,7 +16,7 @@ test('package06e', normalise_version('ghc'), compile_fail, [incr_ghc]) test('package07e', normalise_version('ghc'), compile_fail, [incr_ghc + inc_ghc + hide_ghc]) test('package08e', normalise_version('ghc'), compile_fail, [incr_ghc + hide_ghc]) test('package09e', normal, compile_fail, ['-package "containers (Data.Map as M, Data.Set as M)"']) -test('package10', normal, compile, ['-hide-all-packages -package "ghc (UniqFM as Prelude)" ']) +test('package10', normal, compile, ['-hide-all-packages -package "ghc (GHC.Types.Unique.FM as Prelude)" ']) test('T4806', normalise_version('containers'), compile_fail, ['-ignore-package containers']) test('T4806a', normalise_version('containers'), compile_fail, ['-ignore-package deepseq']) diff --git a/testsuite/tests/package/package06e.hs b/testsuite/tests/package/package06e.hs index 35b6ceaa76..c130df9b86 100644 --- a/testsuite/tests/package/package06e.hs +++ b/testsuite/tests/package/package06e.hs @@ -1,3 +1,3 @@ module Package06e where import GHC.Hs.Types -import UniqFM +import GHC.Types.Unique.FM diff --git a/testsuite/tests/package/package06e.stderr b/testsuite/tests/package/package06e.stderr index 98f048c107..db6f8ab508 100644 --- a/testsuite/tests/package/package06e.stderr +++ b/testsuite/tests/package/package06e.stderr @@ -7,7 +7,7 @@ package06e.hs:2:1: error: Use -v (or `:set -v` in ghci) to see a list of the files searched for. package06e.hs:3:1: error: - Could not load module ‘UniqFM’ + Could not load module ‘GHC.Types.Unique.FM’ It is a member of the hidden package ‘ghc-8.7’. You can run ‘:set -package ghc’ to expose it. (Note: this unloads all the modules in the current scope.) diff --git a/testsuite/tests/package/package07e.hs b/testsuite/tests/package/package07e.hs index df13ed734e..5ab6ff626c 100644 --- a/testsuite/tests/package/package07e.hs +++ b/testsuite/tests/package/package07e.hs @@ -2,4 +2,4 @@ module Package07e where import GHC.Hs.MyTypes import GHC.Hs.Types import GHC.Hs.Utils -import UniqFM +import GHC.Types.Unique.FM diff --git a/testsuite/tests/package/package07e.stderr b/testsuite/tests/package/package07e.stderr index 5f5f0b9885..52046fc9bf 100644 --- a/testsuite/tests/package/package07e.stderr +++ b/testsuite/tests/package/package07e.stderr @@ -19,7 +19,7 @@ package07e.hs:4:1: error: Use -v (or `:set -v` in ghci) to see a list of the files searched for. package07e.hs:5:1: error: - Could not load module ‘UniqFM’ + Could not load module ‘GHC.Types.Unique.FM’ It is a member of the hidden package ‘ghc-8.7’. You can run ‘:set -package ghc’ to expose it. (Note: this unloads all the modules in the current scope.) diff --git a/testsuite/tests/package/package08e.hs b/testsuite/tests/package/package08e.hs index aba05de9ca..6e547e2dc5 100644 --- a/testsuite/tests/package/package08e.hs +++ b/testsuite/tests/package/package08e.hs @@ -2,4 +2,4 @@ module Package08e where import GHC.Hs.MyTypes import GHC.Hs.Types import GHC.Hs.Utils -import UniqFM +import GHC.Types.Unique.FM diff --git a/testsuite/tests/package/package08e.stderr b/testsuite/tests/package/package08e.stderr index 46d665bceb..1c2191be31 100644 --- a/testsuite/tests/package/package08e.stderr +++ b/testsuite/tests/package/package08e.stderr @@ -19,7 +19,7 @@ package08e.hs:4:1: error: Use -v (or `:set -v` in ghci) to see a list of the files searched for. package08e.hs:5:1: error: - Could not load module ‘UniqFM’ + Could not load module ‘GHC.Types.Unique.FM’ It is a member of the hidden package ‘ghc-8.7’. You can run ‘:set -package ghc’ to expose it. (Note: this unloads all the modules in the current scope.) diff --git a/testsuite/tests/parser/should_run/CountParserDeps.hs b/testsuite/tests/parser/should_run/CountParserDeps.hs index 0fedc62dca..1872c93ba8 100644 --- a/testsuite/tests/parser/should_run/CountParserDeps.hs +++ b/testsuite/tests/parser/should_run/CountParserDeps.hs @@ -11,7 +11,7 @@ module Main(main) where -- need exists to produce ASTs and nothing more. import GHC.Driver.Types -import Module +import GHC.Types.Module import GHC.Driver.Session import GHC.Driver.Main import GHC @@ -21,7 +21,7 @@ import Control.Monad import Control.Monad.IO.Class import System.Environment import System.Exit -import UniqSet +import GHC.Types.Unique.Set main :: IO () main = do diff --git a/testsuite/tests/parser/should_run/readRun004.hs b/testsuite/tests/parser/should_run/readRun004.hs index 698aa151af..9dc09dac55 100644 --- a/testsuite/tests/parser/should_run/readRun004.hs +++ b/testsuite/tests/parser/should_run/readRun004.hs @@ -3,7 +3,7 @@ -- should_run to make sure linking succeeds -- (curried unboxed tuples with both boxed -- and unboxed components). --- See #1509; also Note [Primop wrappers] in Id.lhs +-- See #1509; also Note [Primop wrappers] in GHC.Types.Id import GHC.Exts diff --git a/testsuite/tests/perf/should_run/UniqLoop.hs b/testsuite/tests/perf/should_run/UniqLoop.hs index d4455f99b6..bd86ba3360 100644 --- a/testsuite/tests/perf/should_run/UniqLoop.hs +++ b/testsuite/tests/perf/should_run/UniqLoop.hs @@ -2,8 +2,8 @@ module Main where -import UniqSupply -import Unique +import GHC.Types.Unique.Supply +import GHC.Types.Unique -- Generate a lot of uniques main = do diff --git a/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs b/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs index ab3a1e26e3..1e047eea7e 100644 --- a/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs +++ b/testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs @@ -1,7 +1,7 @@ {-# OPTIONS_GHC -Wall #-} module Hooks.Plugin (plugin) where -import BasicTypes +import GHC.Types.Basic import GHC.Plugins import GHC.Hs.Expr import GHC.Hs.Extension diff --git a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs index 91ecb6d44b..f3ba8ff8df 100644 --- a/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs +++ b/testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs @@ -2,7 +2,7 @@ module Simple.Plugin(plugin) where -import UniqFM +import GHC.Types.Unique.FM import GHC.Plugins import qualified ErrUtils diff --git a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs index 4ca8d3fee3..2d1c2f7eba 100644 --- a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs +++ b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs @@ -10,13 +10,13 @@ import TcRnTypes import GHC.Hs.Extension import GHC.Hs.Expr import Outputable -import SrcLoc +import GHC.Types.SrcLoc import GHC.Hs import GHC.Hs.Binds -import OccName -import RdrName -import Name -import Avail +import GHC.Types.Name.Occurrence +import GHC.Types.Name.Reader +import GHC.Types.Name +import GHC.Types.Avail import GHC.Hs.Dump plugin :: Plugin diff --git a/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs index c16eea0c64..d58c69f375 100644 --- a/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs +++ b/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs @@ -7,7 +7,7 @@ import GHC.Driver.Plugins import GHC.Driver.Types import TcRnTypes import GHC.Hs.Extension -import Avail +import GHC.Types.Avail import GHC.Hs.Expr import Outputable import GHC.Hs.ImpExp diff --git a/testsuite/tests/plugins/static-plugins.hs b/testsuite/tests/plugins/static-plugins.hs index 77d451451a..3a0f3dfb08 100644 --- a/testsuite/tests/plugins/static-plugins.hs +++ b/testsuite/tests/plugins/static-plugins.hs @@ -1,6 +1,6 @@ module Main where -import Avail +import GHC.Types.Avail import Control.Monad.IO.Class import GHC.Driver.Session (getDynFlags, parseDynamicFlagsCmdLine, defaultFatalMessager, defaultFlushOut) diff --git a/testsuite/tests/pmcheck/should_compile/T11195.hs b/testsuite/tests/pmcheck/should_compile/T11195.hs index 3e45f24c23..ff3e5ae6fa 100644 --- a/testsuite/tests/pmcheck/should_compile/T11195.hs +++ b/testsuite/tests/pmcheck/should_compile/T11195.hs @@ -8,8 +8,8 @@ import GHC.Core.Type hiding( substTyVarBndr, substTy, extendTCvSubst ) import GHC.Core.InstEnv import GHC.Core.Coercion.Axiom import TcType ( exactTyCoVarsOfType ) -import VarSet -import VarEnv +import GHC.Types.Var.Set +import GHC.Types.Var.Env import Pair type NormalCo = Coercion diff --git a/testsuite/tests/pmcheck/should_compile/pmc009.hs b/testsuite/tests/pmcheck/should_compile/pmc009.hs index 95999b2de5..6f089b86e9 100644 --- a/testsuite/tests/pmcheck/should_compile/pmc009.hs +++ b/testsuite/tests/pmcheck/should_compile/pmc009.hs @@ -1,6 +1,6 @@ module HsUtils where import GHC.Hs.Binds -import SrcLoc +import GHC.Types.SrcLoc addPatSynSelector:: LHsBind p -> [a] addPatSynSelector bind diff --git a/testsuite/tests/quasiquotation/T7918.hs b/testsuite/tests/quasiquotation/T7918.hs index da770f11c1..d322a7f11e 100644 --- a/testsuite/tests/quasiquotation/T7918.hs +++ b/testsuite/tests/quasiquotation/T7918.hs @@ -5,9 +5,9 @@ import GHC import GHC.Driver.Session import Outputable import MonadUtils -import NameSet -import Var -import SrcLoc +import GHC.Types.Name.Set +import GHC.Types.Var +import GHC.Types.SrcLoc as SrcLoc import Data.Data diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs index 2b018fc0e1..a7e93259ca 100644 --- a/testsuite/tests/regalloc/regalloc_unit_tests.hs +++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs @@ -31,16 +31,16 @@ import GHC.Cmm.Pipeline import GHC.Cmm.Parser import GHC.Cmm.Info import GHC.Cmm -import Module +import GHC.Types.Module import GHC.Cmm.DebugBlock import GHC import GHC.Driver.Monad -import UniqFM -import UniqSupply +import GHC.Types.Unique.FM +import GHC.Types.Unique.Supply import GHC.Driver.Session import ErrUtils import Outputable -import BasicTypes +import GHC.Types.Basic import Stream (collect, yield) diff --git a/testsuite/tests/simplCore/should_run/SeqRule.hs b/testsuite/tests/simplCore/should_run/SeqRule.hs index 406add55ca..536ecb59c6 100644 --- a/testsuite/tests/simplCore/should_run/SeqRule.hs +++ b/testsuite/tests/simplCore/should_run/SeqRule.hs @@ -2,7 +2,7 @@ -- This test checks that the magic treatment of RULES -- for 'seq' works right. -- --- See Note [User-defined RULES for seq] in MkId for more details +-- See Note [User-defined RULES for seq] in GHC.Types.Id.Make for more details module Main where diff --git a/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs b/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs index 1614b7ce42..5794875556 100644 --- a/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs +++ b/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs @@ -1,14 +1,14 @@ module Main where -import BasicTypes +import GHC.Types.Basic import GHC import GHC.Driver.Monad import Outputable import GHC.Types.RepType import TysPrim import TysWiredIn -import UniqSet -import Unique +import GHC.Types.Unique.Set +import GHC.Types.Unique import qualified Control.Exception as E import Control.Monad diff --git a/utils/check-api-annotations/Main.hs b/utils/check-api-annotations/Main.hs index 83568c573f..3546e8693f 100644 --- a/utils/check-api-annotations/Main.hs +++ b/utils/check-api-annotations/Main.hs @@ -6,7 +6,7 @@ import GHC import GHC.Driver.Session import Outputable import ApiAnnotation -import SrcLoc +import GHC.Types.SrcLoc import System.Environment( getArgs ) import System.Exit import qualified Data.Map as Map diff --git a/utils/check-ppr/Main.hs b/utils/check-ppr/Main.hs index c5561a8567..0119311531 100644 --- a/utils/check-ppr/Main.hs +++ b/utils/check-ppr/Main.hs @@ -1,7 +1,7 @@ {-# LANGUAGE ScopedTypeVariables #-} import Data.List -import SrcLoc +import GHC.Types.SrcLoc import GHC hiding (moduleName) import GHC.Hs.Dump import GHC.Driver.Session diff --git a/utils/haddock b/utils/haddock -Subproject 3174ad334c2c505394703ce96fcb67ace94a427 +Subproject 65f22afa9e66195baa6b7d44369e2b23cd8f77d |