Commit 30c122df authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Don't import FastString in HsVersions.h

Modules that need it import it themselves instead.
parent 7c7104a5
......@@ -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
......
......@@ -58,7 +58,7 @@ module BasicTypes(
#include "HsVersions.h"
import FastString( FastString )
import FastString
import Outputable
\end{code}
......
......@@ -92,6 +92,7 @@ import ForeignCall
import NewDemand
import Outputable
import Module
import FastString
import Data.Maybe
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -46,6 +46,7 @@ import Maybes
import Outputable
import FastTypes
import StaticFlags
import FastString
\end{code}
......
......@@ -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
......
......@@ -33,6 +33,7 @@ import StaticFlags
import Unique
import Maybe
import List
import FastString
import Panic
......
......@@ -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
......@@ -27,6 +27,7 @@ import Outputable
import PprCmm
import Unique
import Constants
import FastString
import Control.Monad
......
......@@ -574,5 +574,3 @@ isComparisonExpr _other = False
isPicReg (CmmReg (CmmGlobal PicBaseReg)) = True
isPicReg _ = False
_unused :: FS.FastString -- stops a warning
_unused = undefined
......@@ -90,6 +90,7 @@ module MachOp (
import Constants
import Outputable
import FastString
-- -----------------------------------------------------------------------------
-- MachRep
......
......@@ -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
......@@ -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))
......
......@@ -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
......@@ -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
......
......@@ -62,6 +62,7 @@ import StgSyn
import Unique
import UniqSet
import Outputable
import FastString
\end{code}
......
......@@ -52,6 +52,7 @@ import PrelInfo
import Outputable
import ListSetOps
import Util
import FastString
\end{code}
......
......@@ -43,6 +43,7 @@ import ClosureInfo
import Constants
import StaticFlags
import Outputable
import FastString
import Control.Monad
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment