diff options
66 files changed, 73 insertions, 32 deletions
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h index d85234784a..9a83af9768 100644 --- a/compiler/HsVersions.h +++ b/compiler/HsVersions.h @@ -46,18 +46,9 @@ name :: IORef (ty); \ name = Util.globalM (value); #endif -#ifdef DEBUG -#define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else -#define ASSERT2(e,msg) if (not (e)) then (assertPprPanic __FILE__ __LINE__ (msg)) else +#define ASSERT(e) if debugIsOn && not (e) then (assertPanic __FILE__ __LINE__) else +#define ASSERT2(e,msg) if debugIsOn && not (e) then (assertPprPanic __FILE__ __LINE__ (msg)) else #define WARN( e, msg ) (warnPprTrace (e) __FILE__ __LINE__ (msg)) $ -#else --- We have to actually use all the variables we are given or we may get --- unused variable warnings when DEBUG is off. -#define ASSERT(e) if False && (not (e)) then panic "ASSERT" else -#define ASSERT2(e,msg) if False && (const False (e,msg)) then pprPanic "ASSERT2" (msg) else -#define WARN(e,msg) if False && (e) then pprPanic "WARN" (msg) else --- Here we deliberately don't use when as Control.Monad might not be imported -#endif -- Examples: Assuming flagSet :: String -> m Bool -- diff --git a/compiler/basicTypes/Id.lhs b/compiler/basicTypes/Id.lhs index d1df6cc0ab..299ea17d8f 100644 --- a/compiler/basicTypes/Id.lhs +++ b/compiler/basicTypes/Id.lhs @@ -126,7 +126,7 @@ import Outputable import Unique import UniqSupply import FastString -import Util( count ) +import Util import StaticFlags -- infixl so you can say (id `set` a `set` b) diff --git a/compiler/basicTypes/Literal.lhs b/compiler/basicTypes/Literal.lhs index 966dca1e71..e29b49a9a5 100644 --- a/compiler/basicTypes/Literal.lhs +++ b/compiler/basicTypes/Literal.lhs @@ -62,6 +62,8 @@ import BasicTypes import Binary import Constants import UniqFM +import Util + import Data.Int import Data.Ratio import Data.Word diff --git a/compiler/basicTypes/Unique.lhs b/compiler/basicTypes/Unique.lhs index f99a50cfeb..7c0f26f4bf 100644 --- a/compiler/basicTypes/Unique.lhs +++ b/compiler/basicTypes/Unique.lhs @@ -71,6 +71,7 @@ import FastTypes import FastString import Outputable -- import StaticFlags +import Util #if defined(__GLASGOW_HASKELL__) --just for implementing a fast [0,61) -> Char function diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs index 27c9bcb2cf..b39a59134c 100644 --- a/compiler/cmm/CmmBuildInfoTables.hs +++ b/compiler/cmm/CmmBuildInfoTables.hs @@ -32,7 +32,7 @@ import Constants import Digraph import qualified Prelude as P import Prelude hiding (succ) -import Util (sortLe) +import Util import BlockId import Bitmap diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index a13ae12135..e4370696e1 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -27,6 +27,8 @@ import Platform import StaticFlags import UniqSupply import MonadUtils +import Util + import Data.Bits import Data.Word diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs index 6d02e693fb..e5de4e551d 100644 --- a/compiler/cmm/CmmUtils.hs +++ b/compiler/cmm/CmmUtils.hs @@ -83,6 +83,7 @@ import OptimizationFuel as F import Unique import UniqSupply import Constants( wORD_SIZE, tAG_MASK ) +import Util import Data.Word import Data.Maybe diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs index debc9e4a35..04586b1029 100644 --- a/compiler/cmm/MkGraph.hs +++ b/compiler/cmm/MkGraph.hs @@ -42,6 +42,7 @@ import SMRep (ByteOff) import StaticFlags import Unique import UniqSupply +import Util #include "HsVersions.h" diff --git a/compiler/cmm/OptimizationFuel.hs b/compiler/cmm/OptimizationFuel.hs index f624c1c7b6..a85b11bcc6 100644 --- a/compiler/cmm/OptimizationFuel.hs +++ b/compiler/cmm/OptimizationFuel.hs @@ -22,6 +22,7 @@ import Control.Monad import StaticFlags (opt_Fuel) import UniqSupply import Panic +import Util import Compiler.Hoopl import Compiler.Hoopl.GHC (getFuel, setFuel) diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index c0e3e3be8b..b96898f591 100644 --- a/compiler/codeGen/CgMonad.lhs +++ b/compiler/codeGen/CgMonad.lhs @@ -77,6 +77,7 @@ import VarEnv import OrdList import Unique import UniqSupply +import Util import Outputable import Control.Monad diff --git a/compiler/codeGen/CgTailCall.lhs b/compiler/codeGen/CgTailCall.lhs index 499529d841..e933fedb5b 100644 --- a/compiler/codeGen/CgTailCall.lhs +++ b/compiler/codeGen/CgTailCall.lhs @@ -43,6 +43,7 @@ import StgSyn import PrimOp import Outputable import StaticFlags +import Util import Control.Monad import Data.Maybe diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs index d8fd07fead..23ae4270f4 100644 --- a/compiler/codeGen/ClosureInfo.lhs +++ b/compiler/codeGen/ClosureInfo.lhs @@ -96,6 +96,7 @@ import Outputable import FastString import Constants import DynFlags +import Util \end{code} diff --git a/compiler/codeGen/CodeGen.lhs b/compiler/codeGen/CodeGen.lhs index aa561c4f40..24ac064256 100644 --- a/compiler/codeGen/CodeGen.lhs +++ b/compiler/codeGen/CodeGen.lhs @@ -45,6 +45,7 @@ import TyCon import Module import ErrUtils import Panic +import Util codeGen :: DynFlags -> Module -- Module we are compiling diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs index 7aa159844b..6e99543064 100644 --- a/compiler/codeGen/StgCmm.hs +++ b/compiler/codeGen/StgCmm.hs @@ -46,6 +46,7 @@ import TyCon import Module import ErrUtils import Outputable +import Util codeGen :: DynFlags -> Module diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index d4ba62c6ca..708b2bd0a7 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -90,6 +90,7 @@ import Outputable import Platform import Constants import DynFlags +import Util ----------------------------------------------------------------------------- -- Representations diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs index e17ac4fd32..ee71f5c86a 100644 --- a/compiler/codeGen/StgCmmCon.hs +++ b/compiler/codeGen/StgCmmCon.hs @@ -41,7 +41,7 @@ import PrelInfo import Outputable import Platform import StaticFlags -import Util ( lengthIs ) +import Util import Control.Monad import Data.Char diff --git a/compiler/codeGen/StgCmmHeap.hs b/compiler/codeGen/StgCmmHeap.hs index 690b0a9622..7b22c5726a 100644 --- a/compiler/codeGen/StgCmmHeap.hs +++ b/compiler/codeGen/StgCmmHeap.hs @@ -44,6 +44,7 @@ import Module import FastString( mkFastString, fsLit ) import Constants import DynFlags +import Util ----------------------------------------------------------- -- Initialise dynamic heap objects diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 331d4f529e..efa234b5a6 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -43,6 +43,7 @@ import Module import FastString import Outputable import StaticFlags +import Util ------------------------------------------------------------------------ -- Primitive operations and foreign calls diff --git a/compiler/coreSyn/MkCore.lhs b/compiler/coreSyn/MkCore.lhs index 53386fec02..3597df5b02 100644 --- a/compiler/coreSyn/MkCore.lhs +++ b/compiler/coreSyn/MkCore.lhs @@ -85,7 +85,7 @@ import Outputable import FastString import UniqSupply import BasicTypes -import Util ( notNull, zipEqual, sortLe ) +import Util import Pair import Constants diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs index 2fff5fdb56..76bdfb930f 100644 --- a/compiler/deSugar/DsCCall.lhs +++ b/compiler/deSugar/DsCCall.lhs @@ -49,6 +49,7 @@ import PrelNames import VarSet import Constants import Outputable +import Util \end{code} Desugaring of @ccall@s consists of adding some state manipulation, diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs index be66b074f3..e5cd98f5f3 100644 --- a/compiler/deSugar/DsForeign.lhs +++ b/compiler/deSugar/DsForeign.lhs @@ -47,6 +47,8 @@ import Config import Constants import OrdList import Pair +import Util + import Data.Maybe import Data.List \end{code} diff --git a/compiler/deSugar/DsListComp.lhs b/compiler/deSugar/DsListComp.lhs index c3c52188fe..74fe642f1e 100644 --- a/compiler/deSugar/DsListComp.lhs +++ b/compiler/deSugar/DsListComp.lhs @@ -33,6 +33,7 @@ import SrcLoc import Outputable import FastString import TcType +import Util \end{code} List comprehensions may be desugared in one of two ways: ``ordinary'' diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index 625c17ab33..9a1d050fb2 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -65,7 +65,7 @@ import Bag import FastString import ForeignCall import MonadUtils -import Util( equalLength, filterOut ) +import Util import Data.Maybe import Control.Monad diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index 29c10bdb48..e1b2ef83df 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -26,7 +26,7 @@ import TcType import DsMonad import DsUtils import MkCore ( mkCoreLets ) -import Util ( all2, takeList, zipEqual ) +import Util import ListSetOps ( runs ) import Id import NameEnv diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index 93e6a8c188..5e5a5f0c62 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -34,6 +34,7 @@ import ClosureInfo -- CgRep stuff import DynFlags import Outputable import Platform +import Util import Control.Monad import Control.Monad.ST ( runST ) diff --git a/compiler/ghci/ByteCodeLink.lhs b/compiler/ghci/ByteCodeLink.lhs index d8235b6905..0087eb2994 100644 --- a/compiler/ghci/ByteCodeLink.lhs +++ b/compiler/ghci/ByteCodeLink.lhs @@ -27,6 +27,7 @@ import Module import FastString import Panic import Outputable +import Util -- Standard libraries diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs index 349c001cc8..c7f4459d6e 100644 --- a/compiler/hsSyn/HsExpr.lhs +++ b/compiler/hsSyn/HsExpr.lhs @@ -32,7 +32,7 @@ import Name import BasicTypes import DataCon import SrcLoc -import Util( dropTail ) +import Util import StaticFlags( opt_PprStyle_Debug ) import Outputable import FastString diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index 305fa54d0e..a69656533c 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -51,6 +51,7 @@ import Outputable import Platform import FastString import Constants +import Util import Data.Bits import Data.Char diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs index d41ee68d20..9456bdaf34 100644 --- a/compiler/iface/BuildTyCl.lhs +++ b/compiler/iface/BuildTyCl.lhs @@ -38,7 +38,7 @@ import Type import Coercion import TcRnMonad -import Util ( isSingleton ) +import Util import Outputable \end{code} diff --git a/compiler/iface/IfaceEnv.lhs b/compiler/iface/IfaceEnv.lhs index 4c66a98314..1e776f52a3 100644 --- a/compiler/iface/IfaceEnv.lhs +++ b/compiler/iface/IfaceEnv.lhs @@ -41,6 +41,7 @@ import FastString import UniqSupply import SrcLoc import BasicTypes +import Util import Outputable import Exception ( evaluate ) diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index 8d190d4e5e..78e24c9aa9 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -147,6 +147,7 @@ import UniqFM ( emptyUFM ) import UniqSupply ( initUs_ ) import Bag import Exception +import Util import Data.List import Control.Monad diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs index 2b8bb62ad2..22406073b5 100644 --- a/compiler/nativeGen/PPC/CodeGen.hs +++ b/compiler/nativeGen/PPC/CodeGen.hs @@ -57,6 +57,7 @@ import Data.Word import BasicTypes import FastString +import Util -- ----------------------------------------------------------------------------- -- Top-level of the instruction selector diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 98d5e892ad..4fa42820ca 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -54,6 +54,7 @@ import FastString import FastBool ( isFastTrue ) import Constants ( wORD_SIZE ) import DynFlags +import Util import Control.Monad import Data.Bits diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 350aedb6f0..6da712ce44 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -76,6 +76,8 @@ import Bag ( Bag, emptyBag, consBag ) import Outputable import FastString import Maybes +import Util + import Control.Applicative ((<$>)) import Control.Monad import Text.ParserCombinators.ReadP as ReadP diff --git a/compiler/prelude/PrelRules.lhs b/compiler/prelude/PrelRules.lhs index fc0c20ad48..7e798be426 100644 --- a/compiler/prelude/PrelRules.lhs +++ b/compiler/prelude/PrelRules.lhs @@ -41,6 +41,7 @@ import FastString import StaticFlags ( opt_SimplExcessPrecision ) import Constants import BasicTypes +import Util import Data.Bits as Bits import Data.Int ( Int64 ) diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs index 7a06bae163..f36e717950 100644 --- a/compiler/prelude/TysWiredIn.lhs +++ b/compiler/prelude/TysWiredIn.lhs @@ -104,6 +104,7 @@ import Data.Array import FastString import Outputable import Config +import Util alpha_tyvar :: [TyVar] alpha_tyvar = [alphaTyVar] diff --git a/compiler/profiling/SCCfinal.lhs b/compiler/profiling/SCCfinal.lhs index 6fc44c1df9..a6fe565746 100644 --- a/compiler/profiling/SCCfinal.lhs +++ b/compiler/profiling/SCCfinal.lhs @@ -34,6 +34,7 @@ import Outputable import DynFlags import FastString import SrcLoc +import Util stgMassageForProfiling diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index 78566de179..7ff7c7adec 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -46,7 +46,7 @@ import RdrName import LoadIface ( loadInterfaceForName ) import UniqSet import Data.List -import Util ( isSingleton, snocView ) +import Util import ListSetOps ( removeDups ) import Outputable import SrcLoc diff --git a/compiler/rename/RnPat.lhs b/compiler/rename/RnPat.lhs index 3e3c2b66d2..df3566d73c 100644 --- a/compiler/rename/RnPat.lhs +++ b/compiler/rename/RnPat.lhs @@ -55,7 +55,7 @@ import Name import NameSet import RdrName import BasicTypes -import Util ( notNull ) +import Util import ListSetOps ( removeDups ) import Outputable import SrcLoc diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index 1b2e8417f3..ecdfdaf36e 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -49,7 +49,7 @@ import Name import SrcLoc import NameSet -import Util ( filterOut ) +import Util import BasicTypes ( IPName(..), ipNameName, compareFixity, funTyFixity, negateFixity, Fixity(..), FixityDirection(..) ) import Outputable diff --git a/compiler/simplCore/FloatIn.lhs b/compiler/simplCore/FloatIn.lhs index c0c6478a7b..5a462443e2 100644 --- a/compiler/simplCore/FloatIn.lhs +++ b/compiler/simplCore/FloatIn.lhs @@ -31,7 +31,7 @@ import Id ( isOneShotBndr, idType ) import Var import Type ( isUnLiftedType ) import VarSet -import Util ( zipEqual, zipWithEqual, count ) +import Util import UniqFM import Outputable \end{code} diff --git a/compiler/simplCore/OccurAnal.lhs b/compiler/simplCore/OccurAnal.lhs index e9ec0bea55..5a204f46b5 100644 --- a/compiler/simplCore/OccurAnal.lhs +++ b/compiler/simplCore/OccurAnal.lhs @@ -44,7 +44,7 @@ import Digraph ( SCC(..), stronglyConnCompFromEdgedVerticesR ) import PrelNames ( buildIdKey, foldrIdKey, runSTRepIdKey, augmentIdKey ) import Unique import UniqFM -import Util ( mapAndUnzip, filterOut, fstOf3 ) +import Util import Bag import Outputable import FastString diff --git a/compiler/simplCore/SimplEnv.lhs b/compiler/simplCore/SimplEnv.lhs index 8661d71e04..d6ba24d754 100644 --- a/compiler/simplCore/SimplEnv.lhs +++ b/compiler/simplCore/SimplEnv.lhs @@ -63,6 +63,7 @@ import BasicTypes import MonadUtils import Outputable import FastString +import Util import Data.List \end{code} diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index 56e0bededd..726d0d5642 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -49,6 +49,7 @@ import Data.List ( mapAccumL ) import Outputable import FastString import Pair +import Util \end{code} diff --git a/compiler/stgSyn/StgSyn.lhs b/compiler/stgSyn/StgSyn.lhs index defec7516b..a55a3ee2e6 100644 --- a/compiler/stgSyn/StgSyn.lhs +++ b/compiler/stgSyn/StgSyn.lhs @@ -67,6 +67,7 @@ import Type ( Type ) import Type ( typePrimRep ) import UniqSet import Unique ( Unique ) +import Util import VarSet ( IdSet, isEmptyVarSet ) \end{code} diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs index b85c107bea..ddeb1aa864 100644 --- a/compiler/stranal/DmdAnal.lhs +++ b/compiler/stranal/DmdAnal.lhs @@ -44,7 +44,7 @@ import UniqFM ( addToUFM_Directly, lookupUFM_Directly, minusUFM, filterUFM ) import Type ( isUnLiftedType, eqType, tyConAppTyCon_maybe ) import Coercion ( coercionKind ) -import Util ( mapAndUnzip, lengthIs, zipEqual ) +import Util import BasicTypes ( Arity, TopLevelFlag(..), isTopLevel, isNeverActive, RecFlag(..), isRec, isMarkedStrict ) import Maybes ( orElse, expectJust ) diff --git a/compiler/stranal/WorkWrap.lhs b/compiler/stranal/WorkWrap.lhs index 2c365887bc..ec351ab7d8 100644 --- a/compiler/stranal/WorkWrap.lhs +++ b/compiler/stranal/WorkWrap.lhs @@ -27,7 +27,7 @@ import BasicTypes import VarEnv ( isEmptyVarEnv ) import Maybes ( orElse ) import WwLib -import Util ( lengthIs, notNull ) +import Util import Outputable import MonadUtils diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs index c43450cb17..b6370b5c92 100644 --- a/compiler/typecheck/FamInst.lhs +++ b/compiler/typecheck/FamInst.lhs @@ -28,7 +28,7 @@ import Outputable import UniqFM import VarSet import FastString -import Util( filterOut, sortWith ) +import Util import Maybes import Control.Monad import Data.Map (Map) diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs index 8a45632bfb..84a5c3dd72 100644 --- a/compiler/typecheck/TcCanonical.lhs +++ b/compiler/typecheck/TcCanonical.lhs @@ -36,7 +36,7 @@ import VarSet import TcSMonad import FastString -import Util ( equalLength ) +import Util import TysWiredIn ( eqTyCon ) diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs index b9711576c4..c20c8aea3b 100644 --- a/compiler/typecheck/TcClassDcl.lhs +++ b/compiler/typecheck/TcClassDcl.lhs @@ -48,6 +48,7 @@ import Maybes import BasicTypes import Bag import FastString +import Util import Control.Monad \end{code} diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs index 2e870da966..3f5fb09f15 100644 --- a/compiler/typecheck/TcEnv.lhs +++ b/compiler/typecheck/TcEnv.lhs @@ -81,6 +81,7 @@ import Outputable import Unique import FastString import ListSetOps +import Util \end{code} diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs index e6586d8ff5..90a174081c 100644 --- a/compiler/typecheck/TcForeign.lhs +++ b/compiler/typecheck/TcForeign.lhs @@ -48,6 +48,7 @@ import Platform import SrcLoc import Bag import FastString +import Util import Control.Monad \end{code} diff --git a/compiler/typecheck/TcGenGenerics.lhs b/compiler/typecheck/TcGenGenerics.lhs index c4a2c33ba1..89444b2b9e 100644 --- a/compiler/typecheck/TcGenGenerics.lhs +++ b/compiler/typecheck/TcGenGenerics.lhs @@ -43,6 +43,7 @@ import Bag import Outputable import FastString import UniqSupply +import Util #include "HsVersions.h" \end{code} diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs index 9104016938..a026c4381c 100644 --- a/compiler/typecheck/TcHsSyn.lhs +++ b/compiler/typecheck/TcHsSyn.lhs @@ -59,6 +59,7 @@ import SrcLoc import Bag import FastString import Outputable +import Util -- import Data.Traversable( traverse ) \end{code} diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index a3808822f6..a8837a78f7 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -73,6 +73,8 @@ import DynFlags ( ExtensionFlag( Opt_DataKinds ) ) import UniqSupply import Outputable import FastString +import Util + import Control.Monad ( unless, when, zipWithM ) \end{code} diff --git a/compiler/typecheck/TcInteract.lhs b/compiler/typecheck/TcInteract.lhs index 2a735fe77f..aa7256f707 100644 --- a/compiler/typecheck/TcInteract.lhs +++ b/compiler/typecheck/TcInteract.lhs @@ -55,6 +55,7 @@ import Pair () import UniqFM import FastString ( sLit ) import DynFlags +import Util \end{code} ********************************************************************** * * diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index d17d3e6a10..23e8973b58 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -119,6 +119,7 @@ import DynFlags import Outputable import ListSetOps import FastString +import Util import Data.Set (Set) diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs index 86209006d0..7b55ca3b12 100644 --- a/compiler/typecheck/TcSplice.lhs +++ b/compiler/typecheck/TcSplice.lhs @@ -66,7 +66,7 @@ import Serialized import ErrUtils import SrcLoc import Outputable -import Util ( dropList ) +import Util import Data.List ( mapAccumL ) import Pair import Unique diff --git a/compiler/types/InstEnv.lhs b/compiler/types/InstEnv.lhs index e28a3fb53e..21e1acd3e7 100644 --- a/compiler/types/InstEnv.lhs +++ b/compiler/types/InstEnv.lhs @@ -32,6 +32,7 @@ import Outputable import ErrUtils import BasicTypes import UniqFM +import Util import Id import FastString import Data.Data ( Data, Typeable ) diff --git a/compiler/types/Kind.lhs b/compiler/types/Kind.lhs index 21e828e99c..bb1b5d7bfa 100644 --- a/compiler/types/Kind.lhs +++ b/compiler/types/Kind.lhs @@ -63,6 +63,7 @@ import TyCon import VarSet import PrelNames import Outputable +import Util \end{code} %************************************************************************ diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs index 4880e68a3a..7d707c33c4 100644 --- a/compiler/types/OptCoercion.lhs +++ b/compiler/types/OptCoercion.lhs @@ -26,6 +26,7 @@ import Outputable import Pair import Maybes( allMaybes ) import FastString +import Util \end{code} %************************************************************************ diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index 605c97fcc4..32d4ee2d99 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -71,6 +71,7 @@ import Outputable import FastString import Pair import StaticFlags( opt_PprStyle_Debug ) +import Util -- libraries import qualified Data.Data as Data hiding ( TyCon ) diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 3130f7175f..9076913751 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -78,7 +78,7 @@ import FastString import FastTypes import Platform import qualified Pretty -import Util ( snocView ) +import Util import Pretty ( Doc, Mode(..) ) import Panic @@ -936,6 +936,7 @@ pprPanicFastInt heading pretty_msg = warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a -- ^ Just warn about an assertion failure, recording the given file and line number. -- Should typically be accessed with the WARN macros +warnPprTrace _ _ _ _ x | not debugIsOn = x warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x warnPprTrace False _file _line _msg x = x warnPprTrace True file line msg x diff --git a/compiler/vectorise/Vectorise/Exp.hs b/compiler/vectorise/Vectorise/Exp.hs index e75cf0e009..c984c10a24 100644 --- a/compiler/vectorise/Vectorise/Exp.hs +++ b/compiler/vectorise/Vectorise/Exp.hs @@ -49,6 +49,7 @@ import Data.Maybe import Data.List import TcRnMonad (doptM) import DynFlags (DynFlag(Opt_AvoidVect)) +import Util -- Main entry point to vectorise expressions ----------------------------------- diff --git a/compiler/vectorise/Vectorise/Monad/InstEnv.hs b/compiler/vectorise/Vectorise/Monad/InstEnv.hs index 971fd8ff1f..546da3387e 100644 --- a/compiler/vectorise/Vectorise/Monad/InstEnv.hs +++ b/compiler/vectorise/Vectorise/Monad/InstEnv.hs @@ -14,6 +14,7 @@ import Class import Type import TyCon import Outputable +import Util #include "HsVersions.h" diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 8c1f5ec5ce..7e83565b1a 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -50,8 +50,7 @@ import Maybes ( orElse, expectJust ) import NameSet import Panic hiding ( showException ) import StaticFlags -import Util ( on, global, toArgs, toCmdArgs, removeSpaces, getCmd, - filterOut, seqList, looksLikeModuleName, partitionWith ) +import Util -- Haskell Libraries import System.Console.Haskeline as Haskeline |