From 30c122df62ec75f9ed7f392f24c2925675bf1d06 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 29 Mar 2008 18:50:43 +0000 Subject: [PATCH] Don't import FastString in HsVersions.h Modules that need it import it themselves instead. --- compiler/HsVersions.h | 17 ++++------------- compiler/basicTypes/BasicTypes.lhs | 2 +- compiler/basicTypes/IdInfo.lhs | 1 + compiler/basicTypes/NameEnv.lhs | 2 -- compiler/basicTypes/NameSet.lhs | 2 -- compiler/basicTypes/NewDemand.lhs | 2 -- compiler/basicTypes/VarEnv.lhs | 1 + compiler/basicTypes/VarSet.lhs | 2 -- compiler/cmm/CmmCPSGen.hs | 1 + compiler/cmm/CmmInfo.hs | 3 --- compiler/cmm/CmmLint.hs | 1 + compiler/cmm/CmmOpt.hs | 2 -- compiler/cmm/MachOp.hs | 1 + compiler/cmm/MkZipCfg.hs | 2 -- compiler/cmm/OptimizationFuel.hs | 5 ----- compiler/cmm/ZipCfg.hs | 2 -- compiler/cmm/ZipDataflow0.hs | 4 ---- compiler/codeGen/CgBindery.lhs | 1 + compiler/codeGen/CgCon.lhs | 1 + compiler/codeGen/CgForeignCall.hs | 1 + compiler/codeGen/CgHeapery.lhs | 1 + compiler/codeGen/CgPrimOp.hs | 1 + compiler/codeGen/CgTailCall.lhs | 5 ----- compiler/codeGen/SMRep.lhs | 1 + compiler/coreSyn/CoreFVs.lhs | 2 -- compiler/coreSyn/CoreLint.lhs | 1 + compiler/coreSyn/CorePrep.lhs | 1 + compiler/coreSyn/CoreSubst.lhs | 1 + compiler/coreSyn/CoreTidy.lhs | 2 -- compiler/coreSyn/CoreUnfold.lhs | 1 + compiler/deSugar/DsGRHSs.lhs | 2 -- compiler/deSugar/DsListComp.lhs | 2 -- compiler/deSugar/DsMonad.lhs | 1 + compiler/deSugar/Match.lhs | 1 + compiler/deSugar/MatchCon.lhs | 2 -- compiler/ghci/RtClosureInspect.hs | 1 + compiler/hsSyn/HsBinds.lhs | 1 + compiler/hsSyn/HsDoc.hs | 2 -- compiler/hsSyn/HsSyn.lhs | 1 + compiler/hsSyn/HsTypes.lhs | 1 + compiler/iface/LoadIface.lhs | 1 + compiler/iface/TcIface.lhs | 3 ++- compiler/main/CmdLineParser.hs | 2 -- compiler/main/Constants.lhs | 2 -- compiler/main/DriverMkDepend.hs | 1 + compiler/main/DriverPipeline.hs | 1 + compiler/main/DynFlags.hs | 2 -- compiler/main/ErrUtils.lhs | 2 -- compiler/main/GHC.hs | 1 + compiler/main/HscStats.lhs | 2 -- compiler/main/HscTypes.lhs | 2 +- compiler/main/PackageConfig.hs | 4 ---- compiler/main/PprTyThing.hs | 1 + compiler/main/StaticFlags.hs | 2 +- compiler/main/SysTools.lhs | 2 +- compiler/main/TidyPgm.lhs | 3 --- compiler/nativeGen/PositionIndependentCode.hs | 1 + compiler/nativeGen/RegAllocLinear.hs | 1 + compiler/nativeGen/RegLiveness.hs | 1 + compiler/prelude/ForeignCall.lhs | 2 +- compiler/prelude/TysPrim.lhs | 2 +- compiler/profiling/SCCfinal.lhs | 2 -- compiler/rename/RnBinds.lhs | 1 + compiler/rename/RnNames.lhs | 1 + compiler/rename/RnSource.lhs | 1 + compiler/rename/RnTypes.lhs | 1 + compiler/simplCore/CSE.lhs | 1 + compiler/simplCore/FloatOut.lhs | 1 + compiler/simplCore/OccurAnal.lhs | 2 -- compiler/simplCore/SimplEnv.lhs | 1 + compiler/simplCore/SimplMonad.lhs | 2 +- compiler/simplCore/SimplUtils.lhs | 1 + compiler/simplCore/Simplify.lhs | 1 + compiler/simplStg/SRT.lhs | 2 -- compiler/simplStg/SimplStg.lhs | 2 -- compiler/simplStg/StgStats.lhs | 2 -- compiler/stgSyn/CoreToStg.lhs | 1 + compiler/stgSyn/StgLint.lhs | 1 + compiler/stgSyn/StgSyn.lhs | 1 + compiler/stranal/WwLib.lhs | 1 + compiler/typecheck/FamInst.lhs | 1 + compiler/typecheck/Inst.lhs | 2 +- compiler/typecheck/TcArrows.lhs | 1 + compiler/typecheck/TcBinds.lhs | 1 + compiler/typecheck/TcDefaults.lhs | 1 + compiler/typecheck/TcDeriv.lhs | 1 + compiler/typecheck/TcEnv.lhs | 1 + compiler/typecheck/TcForeign.lhs | 1 + compiler/typecheck/TcGadt.lhs | 1 + compiler/typecheck/TcHsSyn.lhs | 1 + compiler/typecheck/TcHsType.lhs | 1 + compiler/typecheck/TcMType.lhs | 1 + compiler/typecheck/TcMatches.lhs | 1 + compiler/typecheck/TcRnTypes.lhs | 1 + compiler/typecheck/TcRules.lhs | 1 + compiler/typecheck/TcSimplify.lhs | 1 + compiler/typecheck/TcTyClsDecls.lhs | 1 + compiler/typecheck/TcTyFuns.lhs | 1 + compiler/typecheck/TcType.lhs | 1 + compiler/typecheck/TcUnify.lhs | 1 + compiler/types/Class.lhs | 1 + compiler/types/Coercion.lhs | 4 ++-- compiler/types/FamInstEnv.lhs | 1 + compiler/types/FunDeps.lhs | 2 ++ compiler/types/InstEnv.lhs | 1 + compiler/types/Type.lhs | 1 + compiler/types/Unify.lhs | 2 -- compiler/utils/Digraph.lhs | 2 -- compiler/utils/Encoding.hs | 1 - compiler/utils/FastFunctions.lhs | 1 - compiler/utils/FastString.lhs | 3 --- compiler/utils/FastTypes.lhs | 1 - compiler/utils/Interval.hs | 4 ++-- compiler/utils/Panic.lhs | 2 -- compiler/utils/UniqFM.lhs | 4 ---- compiler/utils/Util.lhs | 2 -- compiler/vectorise/VectCore.hs | 2 -- compiler/vectorise/VectType.hs | 1 + 118 files changed, 86 insertions(+), 116 deletions(-) diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h index 034a9bc..1ba8a01 100644 --- a/compiler/HsVersions.h +++ b/compiler/HsVersions.h @@ -60,21 +60,12 @@ name = Util.global (value); #define WARN(e,msg) if False && (e) then pprPanic "WARN" (msg) else #endif --- This conditional lets us switch off the "import FastString" --- when compiling FastString itself, or when compiling modules that --- don't use it (and would otherwise get warnings, which we treat --- as errors). Can we do this more nicely? -#if !defined(COMPILING_FAST_STRING) && !defined(FAST_STRING_NOT_NEEDED) --- -import qualified FastString as FS -#endif - #if defined(__GLASGOW_HASKELL__) -#define SLIT(x) (FS.mkLitString# (x#)) -#define FSLIT(x) (FS.mkFastString# (x#)) +#define SLIT(x) (FastString.mkLitString# (x#)) +#define FSLIT(x) (FastString.mkFastString# (x#)) #else -#define SLIT(x) (FS.mkLitString (x)) -#define FSLIT(x) (FS.mkFastString (x)) +#define SLIT(x) (FastString.mkLitString (x)) +#define FSLIT(x) (FastString.mkFastString (x)) #endif -- Useful for declaring arguments to be strict diff --git a/compiler/basicTypes/BasicTypes.lhs b/compiler/basicTypes/BasicTypes.lhs index 7a9ff56..d60321a 100644 --- a/compiler/basicTypes/BasicTypes.lhs +++ b/compiler/basicTypes/BasicTypes.lhs @@ -58,7 +58,7 @@ module BasicTypes( #include "HsVersions.h" -import FastString( FastString ) +import FastString import Outputable \end{code} diff --git a/compiler/basicTypes/IdInfo.lhs b/compiler/basicTypes/IdInfo.lhs index 0a54395..708f4df 100644 --- a/compiler/basicTypes/IdInfo.lhs +++ b/compiler/basicTypes/IdInfo.lhs @@ -92,6 +92,7 @@ import ForeignCall import NewDemand import Outputable import Module +import FastString import Data.Maybe diff --git a/compiler/basicTypes/NameEnv.lhs b/compiler/basicTypes/NameEnv.lhs index cebabdd..0f2023b 100644 --- a/compiler/basicTypes/NameEnv.lhs +++ b/compiler/basicTypes/NameEnv.lhs @@ -16,8 +16,6 @@ module NameEnv ( elemNameEnv, mapNameEnv ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Name diff --git a/compiler/basicTypes/NameSet.lhs b/compiler/basicTypes/NameSet.lhs index 8776714..e60ea23 100644 --- a/compiler/basicTypes/NameSet.lhs +++ b/compiler/basicTypes/NameSet.lhs @@ -22,8 +22,6 @@ module NameSet ( findUses, duDefs, duUses, allUses ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Name diff --git a/compiler/basicTypes/NewDemand.lhs b/compiler/basicTypes/NewDemand.lhs index f69d2a4..668a35e 100644 --- a/compiler/basicTypes/NewDemand.lhs +++ b/compiler/basicTypes/NewDemand.lhs @@ -23,8 +23,6 @@ module NewDemand( pprIfaceStrictSig, appIsBottom, isBottomingSig, seqStrictSig, ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import StaticFlags diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index 67bc120..bb988b2 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -46,6 +46,7 @@ import Maybes import Outputable import FastTypes import StaticFlags +import FastString \end{code} diff --git a/compiler/basicTypes/VarSet.lhs b/compiler/basicTypes/VarSet.lhs index d4293ba..d7e8567 100644 --- a/compiler/basicTypes/VarSet.lhs +++ b/compiler/basicTypes/VarSet.lhs @@ -17,8 +17,6 @@ module VarSet ( elemVarSetByKey ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Var diff --git a/compiler/cmm/CmmCPSGen.hs b/compiler/cmm/CmmCPSGen.hs index 55a7397..0d409ab 100644 --- a/compiler/cmm/CmmCPSGen.hs +++ b/compiler/cmm/CmmCPSGen.hs @@ -33,6 +33,7 @@ import StaticFlags import Unique import Maybe import List +import FastString import Panic diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index 49a77e2..c0e217c 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -276,6 +276,3 @@ mkStdInfoTable type_descr closure_descr cl_type srt_len layout_lit type_lit = packHalfWordsCLit cl_type srt_len - -_unused :: FS.FastString -- stops a warning -_unused = undefined diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index e376e56..c4aee8a 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -27,6 +27,7 @@ import Outputable import PprCmm import Unique import Constants +import FastString import Control.Monad diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index 4d0390d..6adafb5 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -574,5 +574,3 @@ isComparisonExpr _other = False isPicReg (CmmReg (CmmGlobal PicBaseReg)) = True isPicReg _ = False -_unused :: FS.FastString -- stops a warning -_unused = undefined diff --git a/compiler/cmm/MachOp.hs b/compiler/cmm/MachOp.hs index 10cc0cd..8f55000 100644 --- a/compiler/cmm/MachOp.hs +++ b/compiler/cmm/MachOp.hs @@ -90,6 +90,7 @@ module MachOp ( import Constants import Outputable +import FastString -- ----------------------------------------------------------------------------- -- MachRep diff --git a/compiler/cmm/MkZipCfg.hs b/compiler/cmm/MkZipCfg.hs index 484068a..067e749 100644 --- a/compiler/cmm/MkZipCfg.hs +++ b/compiler/cmm/MkZipCfg.hs @@ -360,5 +360,3 @@ Emitting a Branch at this point is fine: freshBlockId :: String -> UniqSM BlockId freshBlockId _ = do { u <- getUniqueUs; return $ BlockId u } -_unused :: FS.FastString -_unused = undefined diff --git a/compiler/cmm/OptimizationFuel.hs b/compiler/cmm/OptimizationFuel.hs index 6e05cdc..bc32626 100644 --- a/compiler/cmm/OptimizationFuel.hs +++ b/compiler/cmm/OptimizationFuel.hs @@ -48,11 +48,6 @@ oneLessFuel f = f diffFuel _ _ = 0 #endif --- stop warnings about things that aren't used -_unused :: {-State#-} () -> FS.FastString -_unused = undefined panic - - data FuelState = FuelState { fs_fuellimit :: OptimizationFuel, fs_lastpass :: String } newtype FuelMonad a = FuelMonad (FuelState -> (a, FuelState)) diff --git a/compiler/cmm/ZipCfg.hs b/compiler/cmm/ZipCfg.hs index 1b9b5c3..f07d2fa 100644 --- a/compiler/cmm/ZipCfg.hs +++ b/compiler/cmm/ZipCfg.hs @@ -707,5 +707,3 @@ pprGraph (Graph tail blockenv) = where pprBlock (Block id tail) = ppr id <> colon $$ ppr tail blocks = postorder_dfs_from blockenv tail -_unused :: FS.FastString -_unused = undefined diff --git a/compiler/cmm/ZipDataflow0.hs b/compiler/cmm/ZipDataflow0.hs index 7503d45..00f15db 100644 --- a/compiler/cmm/ZipDataflow0.hs +++ b/compiler/cmm/ZipDataflow0.hs @@ -1088,10 +1088,6 @@ subAnalysis' m = where pprFacts env = nest 2 $ vcat $ map pprFact $ ufmToList env pprFact (id, a) = hang (ppr id <> colon) 4 (ppr a) - -_unused :: FS.FastString -_unused = undefined - null_b_ft = BComp "do nothing" Nothing no2 no2 no2 where no2 _ _ = Nothing diff --git a/compiler/codeGen/CgBindery.lhs b/compiler/codeGen/CgBindery.lhs index d9ddddb..2ea13f6 100644 --- a/compiler/codeGen/CgBindery.lhs +++ b/compiler/codeGen/CgBindery.lhs @@ -62,6 +62,7 @@ import StgSyn import Unique import UniqSet import Outputable +import FastString \end{code} diff --git a/compiler/codeGen/CgCon.lhs b/compiler/codeGen/CgCon.lhs index 711c633..b7dde73 100644 --- a/compiler/codeGen/CgCon.lhs +++ b/compiler/codeGen/CgCon.lhs @@ -52,6 +52,7 @@ import PrelInfo import Outputable import ListSetOps import Util +import FastString \end{code} diff --git a/compiler/codeGen/CgForeignCall.hs b/compiler/codeGen/CgForeignCall.hs index 8e1be19..e9a542e 100644 --- a/compiler/codeGen/CgForeignCall.hs +++ b/compiler/codeGen/CgForeignCall.hs @@ -43,6 +43,7 @@ import ClosureInfo import Constants import StaticFlags import Outputable +import FastString import Control.Monad diff --git a/compiler/codeGen/CgHeapery.lhs b/compiler/codeGen/CgHeapery.lhs index 9cb1bb4..4592e19 100644 --- a/compiler/codeGen/CgHeapery.lhs +++ b/compiler/codeGen/CgHeapery.lhs @@ -52,6 +52,7 @@ import Util import Constants import PackageConfig import Outputable +import FastString import Data.List \end{code} diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs index c77e8e5..207ffe2 100644 --- a/compiler/codeGen/CgPrimOp.hs +++ b/compiler/codeGen/CgPrimOp.hs @@ -35,6 +35,7 @@ import PrimOp import SMRep import Constants import Outputable +import FastString -- --------------------------------------------------------------------------- -- Code generation for PrimOps diff --git a/compiler/codeGen/CgTailCall.lhs b/compiler/codeGen/CgTailCall.lhs index cd100e8..475196a 100644 --- a/compiler/codeGen/CgTailCall.lhs +++ b/compiler/codeGen/CgTailCall.lhs @@ -474,8 +474,3 @@ adjustSpAndHp newRealSp } \end{code} -Some things are unused. -\begin{code} -_unused :: FS.FastString -_unused = undefined -\end{code} diff --git a/compiler/codeGen/SMRep.lhs b/compiler/codeGen/SMRep.lhs index 4bc1222..1845c44 100644 --- a/compiler/codeGen/SMRep.lhs +++ b/compiler/codeGen/SMRep.lhs @@ -53,6 +53,7 @@ import MachOp import StaticFlags import Constants import Outputable +import FastString import Data.Word \end{code} diff --git a/compiler/coreSyn/CoreFVs.lhs b/compiler/coreSyn/CoreFVs.lhs index 57316c7..7b0f027 100644 --- a/compiler/coreSyn/CoreFVs.lhs +++ b/compiler/coreSyn/CoreFVs.lhs @@ -30,8 +30,6 @@ module CoreFVs ( freeVarsOf -- CoreExprWithFVs -> IdSet ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import CoreSyn diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs index e903c6a..345fb73 100644 --- a/compiler/coreSyn/CoreLint.lhs +++ b/compiler/coreSyn/CoreLint.lhs @@ -39,6 +39,7 @@ import StaticFlags import ListSetOps import DynFlags import Outputable +import FastString import Util import Data.Maybe \end{code} diff --git a/compiler/coreSyn/CorePrep.lhs b/compiler/coreSyn/CorePrep.lhs index 4d94261..f0c2d9f 100644 --- a/compiler/coreSyn/CorePrep.lhs +++ b/compiler/coreSyn/CorePrep.lhs @@ -35,6 +35,7 @@ import DynFlags import Util import Outputable import MonadUtils +import FastString \end{code} -- --------------------------------------------------------------------------- diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs index 503432d..adeeadd 100644 --- a/compiler/coreSyn/CoreSubst.lhs +++ b/compiler/coreSyn/CoreSubst.lhs @@ -43,6 +43,7 @@ import UniqSupply import Maybes import Outputable import PprCore () -- Instances +import FastString import Data.List \end{code} diff --git a/compiler/coreSyn/CoreTidy.lhs b/compiler/coreSyn/CoreTidy.lhs index 5acee51..3f84021 100644 --- a/compiler/coreSyn/CoreTidy.lhs +++ b/compiler/coreSyn/CoreTidy.lhs @@ -11,8 +11,6 @@ module CoreTidy ( tidyExpr, tidyVarOcc, tidyRule, tidyRules ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import CoreSyn diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs index 7670060..8da91ed 100644 --- a/compiler/coreSyn/CoreUnfold.lhs +++ b/compiler/coreSyn/CoreUnfold.lhs @@ -48,6 +48,7 @@ import Type import PrelNames import Bag import FastTypes +import FastString import Outputable \end{code} diff --git a/compiler/deSugar/DsGRHSs.lhs b/compiler/deSugar/DsGRHSs.lhs index 683dd21..83ceeca 100644 --- a/compiler/deSugar/DsGRHSs.lhs +++ b/compiler/deSugar/DsGRHSs.lhs @@ -15,8 +15,6 @@ Matching guarded right-hand-sides (GRHSs) module DsGRHSs ( dsGuarded, dsGRHSs ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import {-# SOURCE #-} DsExpr ( dsLExpr, dsLocalBinds ) diff --git a/compiler/deSugar/DsListComp.lhs b/compiler/deSugar/DsListComp.lhs index e5e1fd9..03da525 100644 --- a/compiler/deSugar/DsListComp.lhs +++ b/compiler/deSugar/DsListComp.lhs @@ -15,8 +15,6 @@ Desugaring list comprehensions and array comprehensions module DsListComp ( dsListComp, dsPArrComp ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import {-# SOURCE #-} DsExpr ( dsLExpr, dsLocalBinds ) diff --git a/compiler/deSugar/DsMonad.lhs b/compiler/deSugar/DsMonad.lhs index 52b7705..10cd28a 100644 --- a/compiler/deSugar/DsMonad.lhs +++ b/compiler/deSugar/DsMonad.lhs @@ -59,6 +59,7 @@ import OccName import DynFlags import ErrUtils import MonadUtils +import FastString import Data.IORef \end{code} diff --git a/compiler/deSugar/Match.lhs b/compiler/deSugar/Match.lhs index 793cc56..a7e9bce 100644 --- a/compiler/deSugar/Match.lhs +++ b/compiler/deSugar/Match.lhs @@ -43,6 +43,7 @@ import Maybes import Util import Name import Outputable +import FastString \end{code} This function is a wrapper of @match@, it must be called from all the parts where diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index 3baa966..4e9ee8e 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -15,8 +15,6 @@ Pattern-matching constructors module MatchCon ( matchConFamily ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import {-# SOURCE #-} Match ( match ) diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index 269a7bb..8941638 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -68,6 +68,7 @@ import PrelNames import TysWiredIn import Outputable +import FastString import Panic #ifndef GHCI_TABLES_NEXT_TO_CODE diff --git a/compiler/hsSyn/HsBinds.lhs b/compiler/hsSyn/HsBinds.lhs index 07c631a..d1c2234 100644 --- a/compiler/hsSyn/HsBinds.lhs +++ b/compiler/hsSyn/HsBinds.lhs @@ -35,6 +35,7 @@ import SrcLoc import Util import Var import Bag +import FastString \end{code} %************************************************************************ diff --git a/compiler/hsSyn/HsDoc.hs b/compiler/hsSyn/HsDoc.hs index dc7245d..fd721c0 100644 --- a/compiler/hsSyn/HsDoc.hs +++ b/compiler/hsSyn/HsDoc.hs @@ -6,8 +6,6 @@ module HsDoc ( ppr_mbDoc ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Outputable diff --git a/compiler/hsSyn/HsSyn.lhs b/compiler/hsSyn/HsSyn.lhs index 66f6633..20e339f 100644 --- a/compiler/hsSyn/HsSyn.lhs +++ b/compiler/hsSyn/HsSyn.lhs @@ -46,6 +46,7 @@ import IfaceSyn ( IfaceBinding ) import Outputable import SrcLoc ( Located(..) ) import Module ( Module, ModuleName ) +import FastString \end{code} All we actually declare here is the top-level structure for a module. diff --git a/compiler/hsSyn/HsTypes.lhs b/compiler/hsSyn/HsTypes.lhs index 2b3fc09..25d6566 100644 --- a/compiler/hsSyn/HsTypes.lhs +++ b/compiler/hsSyn/HsTypes.lhs @@ -38,6 +38,7 @@ import BasicTypes import SrcLoc import StaticFlags import Outputable +import FastString \end{code} diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 6211176..feb51d1 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -58,6 +58,7 @@ import Outputable import BinIface import Panic import Util +import FastString import Control.Monad import Data.List diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index b50ff7f..e1a6d2b 100644 --- a/compiler/iface/TcIface.lhs +++ b/compiler/iface/TcIface.lhs @@ -58,8 +58,9 @@ import Maybes import SrcLoc import DynFlags import Util -import Control.Monad +import FastString +import Control.Monad import Data.List import Data.Maybe \end{code} diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index c7ad66e..8ec2f6a 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -14,8 +14,6 @@ module CmdLineParser ( CmdLineP(..), getCmdLineState, putCmdLineState ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Util diff --git a/compiler/main/Constants.lhs b/compiler/main/Constants.lhs index d26db11..5197172 100644 --- a/compiler/main/Constants.lhs +++ b/compiler/main/Constants.lhs @@ -13,8 +13,6 @@ import Data.Bits (shiftL) -- we want; if we just hope a -I... will get the right one, we could -- be in trouble. --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" #include "../includes/MachRegs.h" #include "../includes/Constants.h" diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index 901b3bb..4155274 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -35,6 +35,7 @@ import Panic import SrcLoc import Data.List import CmdLineParser +import FastString import ErrUtils ( debugTraceMsg, putMsg ) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 50b4501..59535f0 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -45,6 +45,7 @@ import Maybes ( expectJust ) import ParserCoreUtils ( getCoreModuleName ) import SrcLoc ( unLoc ) import SrcLoc ( Located(..) ) +import FastString import Control.Exception as Exception import Data.IORef ( readIORef, writeIORef, IORef ) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 3645e08..7fc2c9a 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -60,8 +60,6 @@ module DynFlags ( compilerInfo, ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Module diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs index 455b3bf..9ce02a3 100644 --- a/compiler/main/ErrUtils.lhs +++ b/compiler/main/ErrUtils.lhs @@ -28,8 +28,6 @@ module ErrUtils ( debugTraceMsg, ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Bag ( Bag, bagToList, isEmptyBag, emptyBag ) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 0caa1cb..bd6eee6 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -266,6 +266,7 @@ import BasicTypes import Maybes ( expectJust, mapCatMaybes ) import HaddockParse import HaddockLex ( tokenise ) +import FastString import Control.Concurrent import System.Directory ( getModificationTime, doesFileExist, diff --git a/compiler/main/HscStats.lhs b/compiler/main/HscStats.lhs index 52e396d..e717bfe 100644 --- a/compiler/main/HscStats.lhs +++ b/compiler/main/HscStats.lhs @@ -6,8 +6,6 @@ \begin{code} module HscStats ( ppSourceStats ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import HsSyn diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index 07c7568..ec87262 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -112,7 +112,7 @@ import BreakArray import SrcLoc ( SrcSpan, Located ) import LazyUniqFM ( lookupUFM, eltsUFM, emptyUFM ) import UniqSupply ( UniqSupply ) -import FastString ( FastString ) +import FastString import StringBuffer ( StringBuffer ) import System.FilePath diff --git a/compiler/main/PackageConfig.hs b/compiler/main/PackageConfig.hs index c070ca2..80488ec 100644 --- a/compiler/main/PackageConfig.hs +++ b/compiler/main/PackageConfig.hs @@ -22,10 +22,6 @@ import Distribution.Package import Distribution.Version import Distribution.Compat.ReadP ( readP_to_S ) --- warning suppression -_unused :: FS.FastString -_unused = FSLIT("") - -- ----------------------------------------------------------------------------- -- Our PackageConfig type is just InstalledPackageInfo from Cabal. Later we -- might need to extend it with some GHC-specific stuff, but for now it's fine. diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index e57122b..0609660 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -27,6 +27,7 @@ import TcType import Var import Name import Outputable +import FastString -- ----------------------------------------------------------------------------- -- Pretty-printing entities that we get from the GHC API diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 7200c35..a2362d9 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -75,7 +75,7 @@ module StaticFlags ( import CmdLineParser import Config -import FastString ( FastString, mkFastString ) +import FastString import Util import Maybes ( firstJust ) import Panic diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 576c3fc..97a5ea7 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -74,7 +74,7 @@ import CString ( CString, peekCString ) import System.Process ( runInteractiveProcess, getProcessExitCode ) import Control.Concurrent( forkIO, newChan, readChan, writeChan ) -import FastString ( mkFastString ) +import FastString import SrcLoc ( SrcLoc, mkSrcLoc, noSrcSpan, mkSrcSpan ) \end{code} diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs index ca02122..64f3498 100644 --- a/compiler/main/TidyPgm.lhs +++ b/compiler/main/TidyPgm.lhs @@ -45,9 +45,6 @@ import FastBool hiding ( fastOr ) import Data.List ( partition ) import Data.Maybe ( isJust ) import Data.IORef ( IORef, readIORef, writeIORef ) - -_dummy :: FS.FastString -_dummy = FSLIT("") \end{code} diff --git a/compiler/nativeGen/PositionIndependentCode.hs b/compiler/nativeGen/PositionIndependentCode.hs index 7d13f11..8cd797d 100644 --- a/compiler/nativeGen/PositionIndependentCode.hs +++ b/compiler/nativeGen/PositionIndependentCode.hs @@ -76,6 +76,7 @@ import qualified Outputable import Panic ( panic ) import DynFlags +import FastString -- The most important function here is cmmMakeDynamicReference. diff --git a/compiler/nativeGen/RegAllocLinear.hs b/compiler/nativeGen/RegAllocLinear.hs index 4b023c5..14d7eba 100644 --- a/compiler/nativeGen/RegAllocLinear.hs +++ b/compiler/nativeGen/RegAllocLinear.hs @@ -101,6 +101,7 @@ import UniqFM import UniqSupply import Outputable import State +import FastString import Data.Maybe import Data.List diff --git a/compiler/nativeGen/RegLiveness.hs b/compiler/nativeGen/RegLiveness.hs index 9ee9897..6bee0c8 100644 --- a/compiler/nativeGen/RegLiveness.hs +++ b/compiler/nativeGen/RegLiveness.hs @@ -46,6 +46,7 @@ import UniqFM import UniqSupply import Bag import State +import FastString import Data.List import Data.Maybe diff --git a/compiler/prelude/ForeignCall.lhs b/compiler/prelude/ForeignCall.lhs index e97a241..5013078 100644 --- a/compiler/prelude/ForeignCall.lhs +++ b/compiler/prelude/ForeignCall.lhs @@ -26,7 +26,7 @@ module ForeignCall ( #include "HsVersions.h" -import FastString ( FastString, unpackFS ) +import FastString import Char ( isAlphaNum ) import Binary import Outputable diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs index 9aa837d..6b02116 100644 --- a/compiler/prelude/TysPrim.lhs +++ b/compiler/prelude/TysPrim.lhs @@ -68,7 +68,7 @@ import SrcLoc import Unique ( mkAlphaTyVarUnique, pprUnique ) import PrelNames import StaticFlags -import FastString ( FastString, mkFastString ) +import FastString import Outputable import Char ( ord, chr ) diff --git a/compiler/profiling/SCCfinal.lhs b/compiler/profiling/SCCfinal.lhs index e4d199c..a254a08 100644 --- a/compiler/profiling/SCCfinal.lhs +++ b/compiler/profiling/SCCfinal.lhs @@ -25,8 +25,6 @@ This is now a sort-of-normal STG-to-STG pass (WDP 94/06), run by stg2stg. \begin{code} module SCCfinal ( stgMassageForProfiling ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import StgSyn diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 638e955..e27be3d 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -60,6 +60,7 @@ import BasicTypes ( RecFlag(..) ) import Digraph ( SCC(..), stronglyConnComp ) import Bag import Outputable +import FastString import Maybes ( orElse ) import Util ( filterOut ) import Monad ( foldM, unless ) diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index b9e491e..d01c5b7 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -49,6 +49,7 @@ import ErrUtils import BasicTypes ( DeprecTxt, Fixity ) import DriverPhases ( isHsBoot ) import Util +import FastString import ListSetOps import Data.List ( partition, concatMap, (\\), delete ) import IO ( openFile, IOMode(..) ) diff --git a/compiler/rename/RnSource.lhs b/compiler/rename/RnSource.lhs index 741440f..70c9957 100644 --- a/compiler/rename/RnSource.lhs +++ b/compiler/rename/RnSource.lhs @@ -49,6 +49,7 @@ import NameEnv import LazyUniqFM import OccName import Outputable +import FastString import SrcLoc ( Located(..), unLoc, noLoc ) import DynFlags ( DynFlag(..) ) import Maybe ( isNothing ) diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index 3de4345..0e58a59 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -31,6 +31,7 @@ import NameSet import BasicTypes ( compareFixity, funTyFixity, negateFixity, Fixity(..), FixityDirection(..) ) import Outputable +import FastString #include "HsVersions.h" \end{code} diff --git a/compiler/simplCore/CSE.lhs b/compiler/simplCore/CSE.lhs index 93b0b8d..38c1f58 100644 --- a/compiler/simplCore/CSE.lhs +++ b/compiler/simplCore/CSE.lhs @@ -23,6 +23,7 @@ import StaticFlags ( opt_PprStyle_Debug ) import BasicTypes ( isAlwaysActive ) import Util ( lengthExceeds ) import UniqFM +import FastString import Data.List \end{code} diff --git a/compiler/simplCore/FloatOut.lhs b/compiler/simplCore/FloatOut.lhs index e6e8b7a..4179774 100644 --- a/compiler/simplCore/FloatOut.lhs +++ b/compiler/simplCore/FloatOut.lhs @@ -31,6 +31,7 @@ import SetLevels ( Level(..), LevelledExpr, LevelledBind, import UniqSupply ( UniqSupply ) import List ( partition ) import Outputable +import FastString \end{code} ----------------- diff --git a/compiler/simplCore/OccurAnal.lhs b/compiler/simplCore/OccurAnal.lhs index 7c7cf89..794217f 100644 --- a/compiler/simplCore/OccurAnal.lhs +++ b/compiler/simplCore/OccurAnal.lhs @@ -15,8 +15,6 @@ module OccurAnal ( occurAnalysePgm, occurAnalyseExpr ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import CoreSyn diff --git a/compiler/simplCore/SimplEnv.lhs b/compiler/simplCore/SimplEnv.lhs index 462a697..699ba7b 100644 --- a/compiler/simplCore/SimplEnv.lhs +++ b/compiler/simplCore/SimplEnv.lhs @@ -66,6 +66,7 @@ import DynFlags import Util import MonadUtils import Outputable +import FastString import Data.List \end{code} diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs index d914ef3..ea5ce12 100644 --- a/compiler/simplCore/SimplMonad.lhs +++ b/compiler/simplCore/SimplMonad.lhs @@ -43,7 +43,7 @@ import StaticFlags ( opt_PprStyle_Debug, opt_HistorySize ) import Unique ( Unique ) import Maybes ( expectJust ) import FiniteMap ( FiniteMap, emptyFM, isEmptyFM, lookupFM, addToFM, plusFM_C, fmToList ) -import FastString ( FastString ) +import FastString import Outputable import FastTypes diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index 060d346..6d22505 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -58,6 +58,7 @@ import BasicTypes import Util import MonadUtils import Outputable +import FastString import List( nub ) \end{code} diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index d41de74..27d2c54 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -34,6 +34,7 @@ import BasicTypes ( TopLevelFlag(..), isTopLevel, import Maybes ( orElse ) import Data.List ( mapAccumL ) import Outputable +import FastString \end{code} diff --git a/compiler/simplStg/SRT.lhs b/compiler/simplStg/SRT.lhs index 1a17c06..989fa4c 100644 --- a/compiler/simplStg/SRT.lhs +++ b/compiler/simplStg/SRT.lhs @@ -16,8 +16,6 @@ bindings have no CAF references, and record the fact in their IdInfo. module SRT( computeSRTs ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import StgSyn diff --git a/compiler/simplStg/SimplStg.lhs b/compiler/simplStg/SimplStg.lhs index e0d13c6..e31415b 100644 --- a/compiler/simplStg/SimplStg.lhs +++ b/compiler/simplStg/SimplStg.lhs @@ -6,8 +6,6 @@ \begin{code} module SimplStg ( stg2stg ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import StgSyn diff --git a/compiler/simplStg/StgStats.lhs b/compiler/simplStg/StgStats.lhs index bca2bbb..25c988d 100644 --- a/compiler/simplStg/StgStats.lhs +++ b/compiler/simplStg/StgStats.lhs @@ -30,8 +30,6 @@ The program gather statistics about module StgStats ( showStgStats ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import StgSyn diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index d03412a..dbb785b 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -39,6 +39,7 @@ import StaticFlags ( opt_RuntimeTypes ) import Module import Outputable import MonadUtils +import FastString import Util \end{code} diff --git a/compiler/stgSyn/StgLint.lhs b/compiler/stgSyn/StgLint.lhs index 9dc83cd..23e8f3b 100644 --- a/compiler/stgSyn/StgLint.lhs +++ b/compiler/stgSyn/StgLint.lhs @@ -34,6 +34,7 @@ import TyCon ( isAlgTyCon, isNewTyCon, tyConDataCons ) import Util ( zipEqual, equalLength ) import SrcLoc ( srcLocSpan ) import Outputable +import FastString import Control.Monad \end{code} diff --git a/compiler/stgSyn/StgSyn.lhs b/compiler/stgSyn/StgSyn.lhs index 893358b..42bcabb 100644 --- a/compiler/stgSyn/StgSyn.lhs +++ b/compiler/stgSyn/StgSyn.lhs @@ -67,6 +67,7 @@ import Unique ( Unique ) import Bitmap import StaticFlags ( opt_SccProfilingOn ) import Module +import FastString \end{code} %************************************************************************ diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index 5f63a48..4254d35 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -28,6 +28,7 @@ import UniqSupply import Unique import Util ( zipWithEqual, notNull ) import Outputable +import FastString import List ( zipWith4 ) \end{code} diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs index ca5a7e9..224a960 100644 --- a/compiler/typecheck/FamInst.lhs +++ b/compiler/typecheck/FamInst.lhs @@ -27,6 +27,7 @@ import SrcLoc import Outputable import LazyUniqFM import FiniteMap +import FastString import Maybe import Monad diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index d507bdd..91e409f 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -60,7 +60,7 @@ module Inst ( import {-# SOURCE #-} TcExpr( tcPolyExpr ) import {-# SOURCE #-} TcUnify( boxyUnify, unifyType ) -import FastString(FastString) +import FastString import HsSyn import TcHsSyn import TcRnMonad diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs index 90a5e88..11daed7 100644 --- a/compiler/typecheck/TcArrows.lhs +++ b/compiler/typecheck/TcArrows.lhs @@ -40,6 +40,7 @@ import Type import SrcLoc import Outputable +import FastString import Util import Control.Monad diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index e3bd657..d9f5587 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -56,6 +56,7 @@ import List import Util import BasicTypes import Outputable +import FastString import Control.Monad \end{code} diff --git a/compiler/typecheck/TcDefaults.lhs b/compiler/typecheck/TcDefaults.lhs index 9da5d96..ad5e9b8 100644 --- a/compiler/typecheck/TcDefaults.lhs +++ b/compiler/typecheck/TcDefaults.lhs @@ -29,6 +29,7 @@ import DynFlags import SrcLoc import Maybe import Outputable +import FastString \end{code} \begin{code} diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 7422c6f..2edd836 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -46,6 +46,7 @@ import SrcLoc import Util import ListSetOps import Outputable +import FastString import Bag \end{code} diff --git a/compiler/typecheck/TcEnv.lhs b/compiler/typecheck/TcEnv.lhs index ad45c7c..aa27a43 100644 --- a/compiler/typecheck/TcEnv.lhs +++ b/compiler/typecheck/TcEnv.lhs @@ -81,6 +81,7 @@ import HscTypes import SrcLoc import Outputable import Maybes +import FastString \end{code} diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs index dc62206..0353f1f 100644 --- a/compiler/typecheck/TcForeign.lhs +++ b/compiler/typecheck/TcForeign.lhs @@ -49,6 +49,7 @@ import Outputable import SrcLoc import Bag import Unique +import FastString \end{code} \begin{code} diff --git a/compiler/typecheck/TcGadt.lhs b/compiler/typecheck/TcGadt.lhs index 48b2b06..e45d6bd 100644 --- a/compiler/typecheck/TcGadt.lhs +++ b/compiler/typecheck/TcGadt.lhs @@ -41,6 +41,7 @@ import Outputable import TcType import Unique import UniqFM +import FastString \end{code} diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs index 7bb1d5e..7afd9e8 100644 --- a/compiler/typecheck/TcHsSyn.lhs +++ b/compiler/typecheck/TcHsSyn.lhs @@ -57,6 +57,7 @@ import SrcLoc import Util import Bag import Outputable +import FastString \end{code} \begin{code} diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index 66102a6..08f4f7f 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -53,6 +53,7 @@ import BasicTypes import SrcLoc import UniqSupply import Outputable +import FastString import Control.Monad \end{code} diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 30917ef..fc434d8 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -88,6 +88,7 @@ import ListSetOps import UniqSupply import SrcLoc import Outputable +import FastString import Control.Monad ( when, unless ) import Data.List ( (\\) ) diff --git a/compiler/typecheck/TcMatches.lhs b/compiler/typecheck/TcMatches.lhs index b7262d6..5826eb9 100644 --- a/compiler/typecheck/TcMatches.lhs +++ b/compiler/typecheck/TcMatches.lhs @@ -42,6 +42,7 @@ import TysPrim import Outputable import Util import SrcLoc +import FastString import Control.Monad \end{code} diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 98bb936..a33faa1 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -74,6 +74,7 @@ import Bag import Outputable import ListSetOps import FiniteMap +import FastString import Data.Maybe import Data.List diff --git a/compiler/typecheck/TcRules.lhs b/compiler/typecheck/TcRules.lhs index a0774fe..50ad098 100644 --- a/compiler/typecheck/TcRules.lhs +++ b/compiler/typecheck/TcRules.lhs @@ -30,6 +30,7 @@ import Id import Name import SrcLoc import Outputable +import FastString \end{code} \begin{code} diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 63529c1..a5ce732 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -64,6 +64,7 @@ import Util import UniqSet import SrcLoc import DynFlags +import FastString import Control.Monad import Data.List diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 054f58b..12fb28d 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -51,6 +51,7 @@ import SrcLoc import ListSetOps import Digraph import DynFlags +import FastString import Data.List import Control.Monad ( mplus ) diff --git a/compiler/typecheck/TcTyFuns.lhs b/compiler/typecheck/TcTyFuns.lhs index 36ff1bb..625d4cd 100644 --- a/compiler/typecheck/TcTyFuns.lhs +++ b/compiler/typecheck/TcTyFuns.lhs @@ -35,6 +35,7 @@ import Bag import Outputable import SrcLoc ( Located(..) ) import Maybes +import FastString -- standard import Data.List diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index c263660..95d8deb 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -165,6 +165,7 @@ import Util import Maybes import ListSetOps import Outputable +import FastString import Data.List import Data.IORef diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index 4aa9b3d..d7399f5 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -60,6 +60,7 @@ import BasicTypes import Util import Outputable import Unique +import FastString import Control.Monad \end{code} diff --git a/compiler/types/Class.lhs b/compiler/types/Class.lhs index 051bef1..2f946d8 100644 --- a/compiler/types/Class.lhs +++ b/compiler/types/Class.lhs @@ -27,6 +27,7 @@ import Name import BasicTypes import Unique import Outputable +import FastString \end{code} %************************************************************************ diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs index 9ebd00e..674e2a7 100644 --- a/compiler/types/Coercion.lhs +++ b/compiler/types/Coercion.lhs @@ -70,7 +70,7 @@ import Util import Unique import BasicTypes import Outputable - +import FastString type Coercion = Type type CoercionKind = Kind -- A CoercionKind is always of form (ty1 :=: ty2) @@ -438,7 +438,7 @@ unsafeCoercionTyCon -------------------------------------- -- ...and their names -mkCoConName :: FS.FastString -> Unique -> TyCon -> Name +mkCoConName :: FastString -> Unique -> TyCon -> Name mkCoConName occ key coCon = mkWiredInName gHC_PRIM (mkOccNameFS tcName occ) key (ATyCon coCon) BuiltInSyntax diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs index 3bfe55d..396c844 100644 --- a/compiler/types/FamInstEnv.lhs +++ b/compiler/types/FamInstEnv.lhs @@ -37,6 +37,7 @@ import UniqFM import Outputable import Maybes import Util +import FastString import Maybe \end{code} diff --git a/compiler/types/FunDeps.lhs b/compiler/types/FunDeps.lhs index ac5c0a0..26c0d68 100644 --- a/compiler/types/FunDeps.lhs +++ b/compiler/types/FunDeps.lhs @@ -27,6 +27,8 @@ import VarSet import VarEnv import Outputable import Util +import FastString + import Data.Maybe ( isJust ) \end{code} diff --git a/compiler/types/InstEnv.lhs b/compiler/types/InstEnv.lhs index 8fd3d83..68a86aa 100644 --- a/compiler/types/InstEnv.lhs +++ b/compiler/types/InstEnv.lhs @@ -33,6 +33,7 @@ import Outputable import BasicTypes import UniqFM import Id +import FastString import Data.Maybe ( isJust, isNothing ) \end{code} diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs index d5c00e8..686bba8 100644 --- a/compiler/types/Type.lhs +++ b/compiler/types/Type.lhs @@ -130,6 +130,7 @@ import TyCon import StaticFlags import Util import Outputable +import FastString import Data.List import Data.Maybe ( isJust ) diff --git a/compiler/types/Unify.lhs b/compiler/types/Unify.lhs index 63c64f0..63089b6 100644 --- a/compiler/types/Unify.lhs +++ b/compiler/types/Unify.lhs @@ -13,8 +13,6 @@ module Unify ( dataConCannotMatch ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Var diff --git a/compiler/utils/Digraph.lhs b/compiler/utils/Digraph.lhs index c36e705..6d1d8d4 100644 --- a/compiler/utils/Digraph.lhs +++ b/compiler/utils/Digraph.lhs @@ -24,8 +24,6 @@ module Digraph( bcc ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" ------------------------------------------------------------------------------ diff --git a/compiler/utils/Encoding.hs b/compiler/utils/Encoding.hs index 2943768..f2659e6 100644 --- a/compiler/utils/Encoding.hs +++ b/compiler/utils/Encoding.hs @@ -23,7 +23,6 @@ module Encoding ( zDecodeString ) where -#define COMPILING_FAST_STRING #include "HsVersions.h" import Foreign import Data.Char ( ord, chr, isDigit, digitToInt, intToDigit, diff --git a/compiler/utils/FastFunctions.lhs b/compiler/utils/FastFunctions.lhs index 5d8ff23..aca5344 100644 --- a/compiler/utils/FastFunctions.lhs +++ b/compiler/utils/FastFunctions.lhs @@ -12,7 +12,6 @@ module FastFunctions ( global, Global ) where -#define COMPILING_FAST_STRING #include "HsVersions.h" import FastTypes diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 2448f16..4417c08 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -71,9 +71,6 @@ module FastString ptrStrLength ) where --- This #define suppresses the "import FastString" that --- HsVersions otherwise produces -#define COMPILING_FAST_STRING #include "HsVersions.h" import Encoding diff --git a/compiler/utils/FastTypes.lhs b/compiler/utils/FastTypes.lhs index 71a317b..a69ab25 100644 --- a/compiler/utils/FastTypes.lhs +++ b/compiler/utils/FastTypes.lhs @@ -39,7 +39,6 @@ module FastTypes ( FastPtr, pBox, pUnbox, castFastPtr ) where -#define COMPILING_FAST_STRING #include "HsVersions.h" #if defined(__GLASGOW_HASKELL__) diff --git a/compiler/utils/Interval.hs b/compiler/utils/Interval.hs index 8d96b19..03545eb 100644 --- a/compiler/utils/Interval.hs +++ b/compiler/utils/Interval.hs @@ -111,6 +111,6 @@ rev_app :: [a] -> [a] -> [a] rev_app [] xs = xs rev_app (y:ys) xs = rev_app ys (y:xs) - -_unused :: FS.FastString +_unused :: () _unused = undefined i_min i_lim overlaps contains + diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs index ffd3b67..f79ffce 100644 --- a/compiler/utils/Panic.lhs +++ b/compiler/utils/Panic.lhs @@ -22,8 +22,6 @@ module Panic installSignalHandlers, interruptTargetThread ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Config diff --git a/compiler/utils/UniqFM.lhs b/compiler/utils/UniqFM.lhs index 862ca58..4081017 100644 --- a/compiler/utils/UniqFM.lhs +++ b/compiler/utils/UniqFM.lhs @@ -839,7 +839,3 @@ use_snd :: a -> b -> b use_snd _ b = b \end{code} -\begin{code} -_unused :: FS.FastString -_unused = undefined -\end{code} diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 9537ae1..1d11b90 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -74,8 +74,6 @@ module Util ( Direction(..), reslash, ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import Panic diff --git a/compiler/vectorise/VectCore.hs b/compiler/vectorise/VectCore.hs index 34ffdb7..de83279 100644 --- a/compiler/vectorise/VectCore.hs +++ b/compiler/vectorise/VectCore.hs @@ -11,8 +11,6 @@ module VectCore ( vCaseDEFAULT, vCaseProd ) where --- XXX This define is a bit of a hack, and should be done more nicely -#define FAST_STRING_NOT_NEEDED 1 #include "HsVersions.h" import CoreSyn diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 86dcaf2..cfcea38 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -45,6 +45,7 @@ import Util ( singleton ) import Digraph ( SCC(..), stronglyConnComp ) import Outputable +import FastString import Control.Monad ( liftM, liftM2, zipWithM, zipWithM_, mapAndUnzipM ) import Data.List ( inits, tails, zipWith4, zipWith5 ) -- 1.7.10.4