diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-04-20 16:54:38 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-26 13:55:14 -0400 |
commit | af332442123878c1b61d236dce46418efcbe8750 (patch) | |
tree | ec4b332843cdd4fedb4aa60b11b7b8dba82a0764 /compiler/GHC/Core/Opt | |
parent | b0fbfc7582fb81314dc28a056536737fb5eeaa6e (diff) | |
download | haskell-af332442123878c1b61d236dce46418efcbe8750.tar.gz |
Modules: Utils and Data (#13009)
Update Haddock submodule
Metric Increase:
haddock.compiler
Diffstat (limited to 'compiler/GHC/Core/Opt')
23 files changed, 126 insertions, 126 deletions
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs index 07e243d662..39e5dd8d0a 100644 --- a/compiler/GHC/Core/Opt/CSE.hs +++ b/compiler/GHC/Core/Opt/CSE.hs @@ -13,7 +13,7 @@ module GHC.Core.Opt.CSE (cseProgram, cseOneExpr) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core.Subst import GHC.Types.Var ( Var ) @@ -28,10 +28,10 @@ import GHC.Core.Utils ( mkAltExpr, eqExpr import GHC.Core.FVs ( exprFreeVars ) import GHC.Core.Type ( tyConAppArgs ) import GHC.Core -import Outputable +import GHC.Utils.Outputable import GHC.Types.Basic import GHC.Core.Map -import Util ( filterOut, equalLength, debugIsOn ) +import GHC.Utils.Misc ( filterOut, equalLength, debugIsOn ) import Data.List ( mapAccumL ) {- diff --git a/compiler/GHC/Core/Opt/CallArity.hs b/compiler/GHC/Core/Opt/CallArity.hs index 33a0e7c31d..ef5bb94b23 100644 --- a/compiler/GHC/Core/Opt/CallArity.hs +++ b/compiler/GHC/Core/Opt/CallArity.hs @@ -7,7 +7,7 @@ module GHC.Core.Opt.CallArity , callArityRHS -- for testing ) where -import GhcPrelude +import GHC.Prelude import GHC.Types.Var.Set import GHC.Types.Var.Env @@ -18,9 +18,9 @@ import GHC.Core import GHC.Types.Id import GHC.Core.Arity ( typeArity ) import GHC.Core.Utils ( exprIsCheap, exprIsTrivial ) -import UnVarGraph +import GHC.Data.Graph.UnVar import GHC.Types.Demand -import Util +import GHC.Utils.Misc import Control.Arrow ( first, second ) diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs index 91b44af996..7c18f27003 100644 --- a/compiler/GHC/Core/Opt/ConstantFold.hs +++ b/compiler/GHC/Core/Opt/ConstantFold.hs @@ -26,7 +26,7 @@ where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import {-# SOURCE #-} GHC.Types.Id.Make ( mkPrimOpId, magicDictId ) @@ -49,13 +49,13 @@ import GHC.Core.Unfold ( exprIsConApp_maybe ) import GHC.Core.Type import GHC.Types.Name.Occurrence ( occNameFS ) import GHC.Builtin.Names -import Maybes ( orElse ) +import GHC.Data.Maybe ( orElse ) import GHC.Types.Name ( Name, nameOccName ) -import Outputable -import FastString +import GHC.Utils.Outputable +import GHC.Data.FastString import GHC.Types.Basic import GHC.Platform -import Util +import GHC.Utils.Misc import GHC.Core.Coercion (mkUnbranchedAxInstCo,mkSymCo,Role(..)) import Control.Applicative ( Alternative(..) ) diff --git a/compiler/GHC/Core/Opt/CprAnal.hs b/compiler/GHC/Core/Opt/CprAnal.hs index 4bc96a81d9..f29c8e7133 100644 --- a/compiler/GHC/Core/Opt/CprAnal.hs +++ b/compiler/GHC/Core/Opt/CprAnal.hs @@ -11,14 +11,14 @@ module GHC.Core.Opt.CprAnal ( cprAnalProgram ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Driver.Session import GHC.Types.Demand import GHC.Types.Cpr import GHC.Core import GHC.Core.Seq -import Outputable +import GHC.Utils.Outputable import GHC.Types.Var.Env import GHC.Types.Basic import Data.List @@ -30,9 +30,9 @@ import GHC.Core.TyCon import GHC.Core.Type import GHC.Core.FamInstEnv import GHC.Core.Opt.WorkWrap.Utils -import Util -import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) -import Maybes ( isJust, isNothing ) +import GHC.Utils.Misc +import GHC.Utils.Error ( dumpIfSet_dyn, DumpFormat (..) ) +import GHC.Data.Maybe ( isJust, isNothing ) {- Note [Constructed Product Result] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs index 30956fd768..5d4e650564 100644 --- a/compiler/GHC/Core/Opt/DmdAnal.hs +++ b/compiler/GHC/Core/Opt/DmdAnal.hs @@ -13,14 +13,14 @@ module GHC.Core.Opt.DmdAnal ( dmdAnalProgram ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Driver.Session import GHC.Core.Opt.WorkWrap.Utils ( findTypeShape ) import GHC.Types.Demand -- All of it import GHC.Core import GHC.Core.Seq ( seqBinds ) -import Outputable +import GHC.Utils.Outputable import GHC.Types.Var.Env import GHC.Types.Basic import Data.List ( mapAccumL ) @@ -32,11 +32,11 @@ import GHC.Core.TyCon import GHC.Core.Type import GHC.Core.Coercion ( Coercion, coVarsOfCo ) import GHC.Core.FamInstEnv -import Util -import Maybes ( isJust ) +import GHC.Utils.Misc +import GHC.Data.Maybe ( isJust ) import GHC.Builtin.Types import GHC.Builtin.Types.Prim ( realWorldStatePrimTy ) -import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) +import GHC.Utils.Error ( dumpIfSet_dyn, DumpFormat (..) ) import GHC.Types.Unique.Set {- diff --git a/compiler/GHC/Core/Opt/Driver.hs b/compiler/GHC/Core/Opt/Driver.hs index 0da360e589..43470240a6 100644 --- a/compiler/GHC/Core/Opt/Driver.hs +++ b/compiler/GHC/Core/Opt/Driver.hs @@ -10,7 +10,7 @@ module GHC.Core.Opt.Driver ( core2core, simplifyExpr ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Driver.Session import GHC.Core @@ -31,12 +31,12 @@ import GHC.Core.Opt.Simplify.Utils ( simplEnvForGHCi, activeRule, activeUnfoldin import GHC.Core.Opt.Simplify.Env import GHC.Core.Opt.Simplify.Monad import GHC.Core.Opt.Monad -import qualified ErrUtils as Err +import qualified GHC.Utils.Error as Err import GHC.Core.Opt.FloatIn ( floatInwards ) import GHC.Core.Opt.FloatOut ( floatOutwards ) import GHC.Core.FamInstEnv import GHC.Types.Id -import ErrUtils ( withTiming, withTimingD, DumpFormat (..) ) +import GHC.Utils.Error ( withTiming, withTimingD, DumpFormat (..) ) import GHC.Types.Basic ( CompilerPhase(..), isDefaultInlinePragma, defaultInlinePragma ) import GHC.Types.Var.Set import GHC.Types.Var.Env @@ -50,14 +50,14 @@ import GHC.Core.Opt.CallArity ( callArityAnalProgram ) import GHC.Core.Opt.Exitify ( exitifyProgram ) import GHC.Core.Opt.WorkWrap ( wwTopBinds ) import GHC.Types.SrcLoc -import Util +import GHC.Utils.Misc import GHC.Types.Module import GHC.Driver.Plugins ( withPlugins, installCoreToDos ) import GHC.Runtime.Loader -- ( initializePlugins ) import GHC.Types.Unique.Supply ( UniqSupply, mkSplitUniqSupply, splitUniqSupply ) import GHC.Types.Unique.FM -import Outputable +import GHC.Utils.Outputable import Control.Monad import qualified GHC.LanguageExtensions as LangExt {- @@ -186,7 +186,7 @@ getCoreToDo dflags )) -- Static forms are moved to the top level with the FloatOut pass. - -- See Note [Grand plan for static forms] in StaticPtrTable. + -- See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable. static_ptrs_float_outwards = runWhen static_ptrs $ CoreDoPasses [ simpl_gently -- Float Out can't handle type lets (sometimes created @@ -248,7 +248,7 @@ getCoreToDo dflags else -- Even with full laziness turned off, we still need to float static -- forms to the top level. See Note [Grand plan for static forms] in - -- StaticPtrTable. + -- GHC.Iface.Tidy.StaticPtrTable. static_ptrs_float_outwards, simpl_phases, diff --git a/compiler/GHC/Core/Opt/Exitify.hs b/compiler/GHC/Core/Opt/Exitify.hs index 088d0cb085..d903185c1d 100644 --- a/compiler/GHC/Core/Opt/Exitify.hs +++ b/compiler/GHC/Core/Opt/Exitify.hs @@ -35,20 +35,20 @@ Example result: Now `t` is no longer in a recursive function, and good things happen! -} -import GhcPrelude +import GHC.Prelude import GHC.Types.Var import GHC.Types.Id import GHC.Types.Id.Info import GHC.Core import GHC.Core.Utils -import State +import GHC.Utils.Monad.State import GHC.Types.Unique import GHC.Types.Var.Set import GHC.Types.Var.Env import GHC.Core.FVs -import FastString +import GHC.Data.FastString import GHC.Core.Type -import Util( mapSnd ) +import GHC.Utils.Misc( mapSnd ) import Data.Bifunctor import Control.Monad diff --git a/compiler/GHC/Core/Opt/FloatIn.hs b/compiler/GHC/Core/Opt/FloatIn.hs index c5b8acc7f6..4d759a47bc 100644 --- a/compiler/GHC/Core/Opt/FloatIn.hs +++ b/compiler/GHC/Core/Opt/FloatIn.hs @@ -20,7 +20,7 @@ module GHC.Core.Opt.FloatIn ( floatInwards ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Platform import GHC.Core @@ -33,9 +33,9 @@ import GHC.Types.Id ( isOneShotBndr, idType, isJoinId, isJoinId_maybe ) import GHC.Types.Var import GHC.Core.Type import GHC.Types.Var.Set -import Util +import GHC.Utils.Misc import GHC.Driver.Session -import Outputable +import GHC.Utils.Outputable -- import Data.List ( mapAccumL ) import GHC.Types.Basic ( RecFlag(..), isRec ) diff --git a/compiler/GHC/Core/Opt/FloatOut.hs b/compiler/GHC/Core/Opt/FloatOut.hs index d9d2d4dccf..92a747424f 100644 --- a/compiler/GHC/Core/Opt/FloatOut.hs +++ b/compiler/GHC/Core/Opt/FloatOut.hs @@ -10,7 +10,7 @@ module GHC.Core.Opt.FloatOut ( floatOutwards ) where -import GhcPrelude +import GHC.Prelude import GHC.Core import GHC.Core.Utils @@ -19,15 +19,15 @@ import GHC.Core.Arity ( etaExpand ) import GHC.Core.Opt.Monad ( FloatOutSwitches(..) ) import GHC.Driver.Session -import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) +import GHC.Utils.Error ( dumpIfSet_dyn, DumpFormat (..) ) import GHC.Types.Id ( Id, idArity, idType, isBottomingId, isJoinId, isJoinId_maybe ) import GHC.Core.Opt.SetLevels import GHC.Types.Unique.Supply ( UniqSupply ) -import Bag -import Util -import Maybes -import Outputable +import GHC.Data.Bag +import GHC.Utils.Misc +import GHC.Data.Maybe +import GHC.Utils.Outputable import GHC.Core.Type import qualified Data.IntMap as M diff --git a/compiler/GHC/Core/Opt/LiberateCase.hs b/compiler/GHC/Core/Opt/LiberateCase.hs index 2e284e3611..7a28abce20 100644 --- a/compiler/GHC/Core/Opt/LiberateCase.hs +++ b/compiler/GHC/Core/Opt/LiberateCase.hs @@ -9,7 +9,7 @@ module GHC.Core.Opt.LiberateCase ( liberateCase ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Driver.Session import GHC.Core @@ -17,7 +17,7 @@ import GHC.Core.Unfold ( couldBeSmallEnoughToInline ) import GHC.Builtin.Types ( unitDataConId ) import GHC.Types.Id import GHC.Types.Var.Env -import Util ( notNull ) +import GHC.Utils.Misc ( notNull ) {- The liberate-case transformation diff --git a/compiler/GHC/Core/Opt/Monad.hs b/compiler/GHC/Core/Opt/Monad.hs index 81faa53e47..19d0eec4a9 100644 --- a/compiler/GHC/Core/Opt/Monad.hs +++ b/compiler/GHC/Core/Opt/Monad.hs @@ -48,7 +48,7 @@ module GHC.Core.Opt.Monad ( dumpIfSet_dyn ) where -import GhcPrelude hiding ( read ) +import GHC.Prelude hiding ( read ) import GHC.Core import GHC.Driver.Types @@ -57,18 +57,18 @@ import GHC.Driver.Session import GHC.Types.Basic ( CompilerPhase(..) ) import GHC.Types.Annotations -import IOEnv hiding ( liftIO, failM, failWithM ) -import qualified IOEnv ( liftIO ) +import GHC.Data.IOEnv hiding ( liftIO, failM, failWithM ) +import qualified GHC.Data.IOEnv as IOEnv import GHC.Types.Var -import Outputable -import FastString -import ErrUtils( Severity(..), DumpFormat (..), dumpOptionsFromFlag ) +import GHC.Utils.Outputable as Outputable +import GHC.Data.FastString +import GHC.Utils.Error( Severity(..), DumpFormat (..), dumpOptionsFromFlag ) import GHC.Types.Unique.Supply -import MonadUtils +import GHC.Utils.Monad import GHC.Types.Name.Env import GHC.Types.SrcLoc import Data.Bifunctor ( bimap ) -import ErrUtils (dumpAction) +import GHC.Utils.Error (dumpAction) import Data.List (intersperse, groupBy, sortBy) import Data.Ord import Data.Dynamic @@ -78,7 +78,7 @@ import qualified Data.Map.Strict as MapStrict import Data.Word import Control.Monad import Control.Applicative ( Alternative(..) ) -import Panic (throwGhcException, GhcException(..)) +import GHC.Utils.Panic (throwGhcException, GhcException(..)) {- ************************************************************************ diff --git a/compiler/GHC/Core/Opt/Monad.hs-boot b/compiler/GHC/Core/Opt/Monad.hs-boot index 6ea3a5b790..b92602dc59 100644 --- a/compiler/GHC/Core/Opt/Monad.hs-boot +++ b/compiler/GHC/Core/Opt/Monad.hs-boot @@ -9,9 +9,9 @@ module GHC.Core.Opt.Monad ( CoreToDo, CoreM ) where -import GhcPrelude +import GHC.Prelude -import IOEnv ( IOEnv ) +import GHC.Data.IOEnv ( IOEnv ) type CoreIOEnv = IOEnv CoreReader diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs index 4fe039cc52..21c7f86d78 100644 --- a/compiler/GHC/Core/Opt/OccurAnal.hs +++ b/compiler/GHC/Core/Opt/OccurAnal.hs @@ -18,7 +18,7 @@ module GHC.Core.Opt.OccurAnal ( occurAnalysePgm, occurAnalyseExpr ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core import GHC.Core.FVs @@ -36,15 +36,15 @@ 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 GHC.Data.Graph.Directed ( SCC(..), Node(..) + , stronglyConnCompFromEdgedVerticesUniq + , stronglyConnCompFromEdgedVerticesUniqR ) import GHC.Types.Unique import GHC.Types.Unique.FM import GHC.Types.Unique.Set -import Util -import Maybes( orElse, isJust ) -import Outputable +import GHC.Utils.Misc +import GHC.Data.Maybe( orElse, isJust ) +import GHC.Utils.Outputable import Data.List {- @@ -1240,7 +1240,7 @@ makeNode env imp_rule_edges bndr_set (bndr, rhs) = DigraphNode details (varUnique bndr) (nonDetKeysUniqSet node_fvs) -- It's OK to use nonDetKeysUniqSet here as stronglyConnCompFromEdgedVerticesR -- is still deterministic with edges in nondeterministic order as - -- explained in Note [Deterministic SCC] in Digraph. + -- explained in Note [Deterministic SCC] in GHC.Data.Graph.Directed. where details = ND { nd_bndr = bndr' , nd_rhs = rhs' @@ -1334,7 +1334,7 @@ mkLoopBreakerNodes env lvl bndr_set body_uds details_s -- It's OK to use nonDetKeysUniqSet here as -- stronglyConnCompFromEdgedVerticesR is still deterministic with edges -- in nondeterministic order as explained in - -- Note [Deterministic SCC] in Digraph. + -- Note [Deterministic SCC] in GHC.Data.Graph.Directed. where nd' = nd { nd_bndr = new_bndr, nd_score = score } score = nodeScore env new_bndr lb_deps nd diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs index 710a8cf70f..8f5d9c654a 100644 --- a/compiler/GHC/Core/Opt/SetLevels.hs +++ b/compiler/GHC/Core/Opt/SetLevels.hs @@ -64,7 +64,7 @@ module GHC.Core.Opt.SetLevels ( #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core import GHC.Core.Opt.Monad ( FloatOutSwitches(..) ) @@ -97,13 +97,13 @@ import GHC.Types.Basic ( Arity, RecFlag(..), isRec ) import GHC.Core.DataCon ( dataConOrigResTy ) import GHC.Builtin.Types import GHC.Types.Unique.Supply -import Util -import Outputable -import FastString +import GHC.Utils.Misc +import GHC.Utils.Outputable +import GHC.Data.FastString import GHC.Types.Unique.DFM -import FV +import GHC.Utils.FV import Data.Maybe -import MonadUtils ( mapAccumLM ) +import GHC.Utils.Monad ( mapAccumLM ) {- ************************************************************************ @@ -702,7 +702,7 @@ lvlMFE env strict_ctxt ann_expr join_arity_maybe = Nothing is_mk_static = isJust (collectMakeStaticArgs expr) - -- Yuk: See Note [Grand plan for static forms] in main/StaticPtrTable + -- Yuk: See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable -- A decision to float entails let-binding this thing, and we only do -- that if we'll escape a value lambda, or will go to the top level. @@ -1699,7 +1699,7 @@ newLvlVar lvld_rhs join_arity_maybe is_mk_static rhs_ty = exprType de_tagged_rhs mk_id uniq rhs_ty - -- See Note [Grand plan for static forms] in StaticPtrTable. + -- See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable. | is_mk_static = mkExportedVanillaId (mkSystemVarName uniq (mkFastString "static_ptr")) rhs_ty diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs index d2b63ecb94..8198ba32cf 100644 --- a/compiler/GHC/Core/Opt/Simplify.hs +++ b/compiler/GHC/Core/Opt/Simplify.hs @@ -11,7 +11,7 @@ module GHC.Core.Opt.Simplify ( simplTopBinds, simplExpr, simplRules ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Platform import GHC.Driver.Session @@ -49,14 +49,14 @@ import GHC.Core.FVs ( mkRuleInfo ) import GHC.Core.Rules ( lookupRule, getRules ) import GHC.Types.Basic ( TopLevelFlag(..), isNotTopLevel, isTopLevel, RecFlag(..), Arity ) -import MonadUtils ( mapAccumLM, liftIO ) +import GHC.Utils.Monad ( mapAccumLM, liftIO ) import GHC.Types.Var ( isTyCoVar ) -import Maybes ( orElse ) +import GHC.Data.Maybe ( orElse ) import Control.Monad -import Outputable -import FastString -import Util -import ErrUtils +import GHC.Utils.Outputable +import GHC.Data.FastString +import GHC.Utils.Misc +import GHC.Utils.Error import GHC.Types.Module ( moduleName, pprModuleName ) import GHC.Builtin.PrimOps ( PrimOp (SeqOp) ) diff --git a/compiler/GHC/Core/Opt/Simplify/Env.hs b/compiler/GHC/Core/Opt/Simplify/Env.hs index 2827ba037d..4a749e8951 100644 --- a/compiler/GHC/Core/Opt/Simplify/Env.hs +++ b/compiler/GHC/Core/Opt/Simplify/Env.hs @@ -45,7 +45,7 @@ module GHC.Core.Opt.Simplify.Env ( #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core.Opt.Simplify.Monad import GHC.Core.Opt.Monad ( SimplMode(..) ) @@ -54,7 +54,7 @@ import GHC.Core.Utils import GHC.Types.Var import GHC.Types.Var.Env import GHC.Types.Var.Set -import OrdList +import GHC.Data.OrdList import GHC.Types.Id as Id import GHC.Core.Make ( mkWildValBinder ) import GHC.Driver.Session ( DynFlags ) @@ -64,9 +64,9 @@ import GHC.Core.Type hiding ( substTy, substTyVar, substTyVarBndr, extendTvS import qualified GHC.Core.Coercion as Coercion import GHC.Core.Coercion hiding ( substCo, substCoVar, substCoVarBndr ) import GHC.Types.Basic -import MonadUtils -import Outputable -import Util +import GHC.Utils.Monad +import GHC.Utils.Outputable +import GHC.Utils.Misc import GHC.Types.Unique.FM ( pprUniqFM ) import Data.List (mapAccumL) diff --git a/compiler/GHC/Core/Opt/Simplify/Monad.hs b/compiler/GHC/Core/Opt/Simplify/Monad.hs index 043ced977b..b36d440402 100644 --- a/compiler/GHC/Core/Opt/Simplify/Monad.hs +++ b/compiler/GHC/Core/Opt/Simplify/Monad.hs @@ -20,7 +20,7 @@ module GHC.Core.Opt.Simplify.Monad ( plusSimplCount, isZeroSimplCount ) where -import GhcPrelude +import GHC.Prelude import GHC.Types.Var ( Var, isId, mkLocalVar ) import GHC.Types.Name ( mkSystemVarName ) @@ -32,12 +32,12 @@ import GHC.Core ( RuleEnv(..) ) import GHC.Types.Unique.Supply import GHC.Driver.Session import GHC.Core.Opt.Monad -import Outputable -import FastString -import MonadUtils -import ErrUtils as Err -import Util ( count ) -import Panic (throwGhcExceptionIO, GhcException (..)) +import GHC.Utils.Outputable +import GHC.Data.FastString +import GHC.Utils.Monad +import GHC.Utils.Error as Err +import GHC.Utils.Misc ( count ) +import GHC.Utils.Panic (throwGhcExceptionIO, GhcException (..)) import GHC.Types.Basic ( IntWithInf, treatZeroAsInf, mkIntWithInf ) import Control.Monad ( ap ) diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs index 1de946f724..14e1a08fe0 100644 --- a/compiler/GHC/Core/Opt/Simplify/Utils.hs +++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs @@ -38,7 +38,7 @@ module GHC.Core.Opt.Simplify.Utils ( #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core.Opt.Simplify.Env import GHC.Core.Opt.Monad ( SimplMode(..), Tick(..) ) @@ -63,12 +63,12 @@ import GHC.Core.Opt.Simplify.Monad import GHC.Core.Type hiding( substTy ) import GHC.Core.Coercion hiding( substCo ) import GHC.Core.DataCon ( dataConWorkId, isNullaryRepDataCon ) -import Util -import OrdList ( isNilOL ) -import MonadUtils -import Outputable +import GHC.Utils.Misc +import GHC.Data.OrdList ( isNilOL ) +import GHC.Utils.Monad +import GHC.Utils.Outputable import GHC.Core.Opt.ConstantFold -import FastString ( fsLit ) +import GHC.Data.FastString ( fsLit ) import Control.Monad ( when ) import Data.List ( sortBy ) diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs index f0a7821b1f..60029cb478 100644 --- a/compiler/GHC/Core/Opt/SpecConstr.hs +++ b/compiler/GHC/Core/Opt/SpecConstr.hs @@ -21,7 +21,7 @@ module GHC.Core.Opt.SpecConstr( #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core import GHC.Core.Subst @@ -46,17 +46,17 @@ 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 GHC.Data.Maybe ( orElse, catMaybes, isJust, isNothing ) import GHC.Types.Demand import GHC.Types.Cpr import GHC.Serialized ( deserializeWithData ) -import Util -import Pair +import GHC.Utils.Misc +import GHC.Data.Pair import GHC.Types.Unique.Supply -import Outputable -import FastString +import GHC.Utils.Outputable +import GHC.Data.FastString import GHC.Types.Unique.FM -import MonadUtils +import GHC.Utils.Monad import Control.Monad ( zipWithM ) import Data.List import GHC.Builtin.Names ( specTyConName ) diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs index b1a85fa93f..f40e67adcd 100644 --- a/compiler/GHC/Core/Opt/Specialise.hs +++ b/compiler/GHC/Core/Opt/Specialise.hs @@ -13,7 +13,7 @@ module GHC.Core.Opt.Specialise ( specProgram, specUnfolding ) where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Types.Id import GHC.Tc.Utils.TcType hiding( substTy ) @@ -38,16 +38,16 @@ import GHC.Types.Unique.Supply import GHC.Types.Name import GHC.Types.Id.Make ( voidArgId, voidPrimId ) import GHC.Builtin.Types.Prim ( voidPrimTy ) -import Maybes ( mapMaybe, maybeToList, isJust ) -import MonadUtils ( foldlM ) +import GHC.Data.Maybe ( mapMaybe, maybeToList, isJust ) +import GHC.Utils.Monad ( foldlM ) import GHC.Types.Basic import GHC.Driver.Types -import Bag +import GHC.Data.Bag import GHC.Driver.Session -import Util -import Outputable -import FastString -import State +import GHC.Utils.Misc +import GHC.Utils.Outputable +import GHC.Data.FastString +import GHC.Utils.Monad.State import GHC.Types.Unique.DFM import GHC.Core.TyCo.Rep (TyCoBinder (..)) diff --git a/compiler/GHC/Core/Opt/StaticArgs.hs b/compiler/GHC/Core/Opt/StaticArgs.hs index 0abcc06382..827a3e90a5 100644 --- a/compiler/GHC/Core/Opt/StaticArgs.hs +++ b/compiler/GHC/Core/Opt/StaticArgs.hs @@ -51,7 +51,7 @@ essential to make this work well! {-# LANGUAGE CPP #-} module GHC.Core.Opt.StaticArgs ( doStaticArgs ) where -import GhcPrelude +import GHC.Prelude import GHC.Types.Var import GHC.Core @@ -62,15 +62,15 @@ import GHC.Types.Id import GHC.Types.Name import GHC.Types.Var.Env import GHC.Types.Unique.Supply -import Util +import GHC.Utils.Misc import GHC.Types.Unique.FM import GHC.Types.Var.Set import GHC.Types.Unique import GHC.Types.Unique.Set -import Outputable +import GHC.Utils.Outputable import Data.List (mapAccumL) -import FastString +import GHC.Data.FastString #include "HsVersions.h" diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs index 0ba6acb731..52cdf04edf 100644 --- a/compiler/GHC/Core/Opt/WorkWrap.hs +++ b/compiler/GHC/Core/Opt/WorkWrap.hs @@ -7,7 +7,7 @@ {-# LANGUAGE CPP #-} module GHC.Core.Opt.WorkWrap ( wwTopBinds ) where -import GhcPrelude +import GHC.Prelude import GHC.Core.Arity ( manifestArity ) import GHC.Core @@ -24,10 +24,10 @@ import GHC.Driver.Session import GHC.Types.Demand import GHC.Types.Cpr import GHC.Core.Opt.WorkWrap.Utils -import Util -import Outputable +import GHC.Utils.Misc +import GHC.Utils.Outputable import GHC.Core.FamInstEnv -import MonadUtils +import GHC.Utils.Monad #include "HsVersions.h" diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs index cbd8788d66..4c4c3dc5e7 100644 --- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs +++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs @@ -16,7 +16,7 @@ where #include "HsVersions.h" -import GhcPrelude +import GHC.Prelude import GHC.Core import GHC.Core.Utils ( exprType, mkCast, mkDefaultCase, mkSingleAltCase ) @@ -42,12 +42,12 @@ import GHC.Types.Basic ( Boxity(..) ) import GHC.Core.TyCon import GHC.Types.Unique.Supply import GHC.Types.Unique -import Maybes -import Util -import Outputable +import GHC.Data.Maybe +import GHC.Utils.Misc +import GHC.Utils.Outputable import GHC.Driver.Session -import FastString -import ListSetOps +import GHC.Data.FastString +import GHC.Data.List.SetOps {- ************************************************************************ @@ -345,7 +345,7 @@ f x y = join j (z, w) = \(u, v) -> ... in jump j (x, y) Typically this happens with functions that are seen as computing functions, -rather than being curried. (The real-life example was GraphOps.addConflicts.) +rather than being curried. (The real-life example was GHC.Data.Graph.Ops.addConflicts.) When we create the wrapper, it *must* be in "eta-contracted" form so that the jump has the right number of arguments: |