Modules that need it import it themselves instead.
#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
#include "HsVersions.h"
-import FastString( FastString )
+import FastString
import Outputable
\end{code}
import NewDemand
import Outputable
import Module
+import FastString
import Data.Maybe
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
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
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
import Outputable
import FastTypes
import StaticFlags
+import FastString
\end{code}
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
import Unique
import Maybe
import List
+import FastString
import Panic
type_lit = packHalfWordsCLit cl_type srt_len
-
-_unused :: FS.FastString -- stops a warning
-_unused = undefined
import PprCmm
import Unique
import Constants
+import FastString
import Control.Monad
isPicReg (CmmReg (CmmGlobal PicBaseReg)) = True
isPicReg _ = False
-_unused :: FS.FastString -- stops a warning
-_unused = undefined
import Constants
import Outputable
+import FastString
-- -----------------------------------------------------------------------------
-- MachRep
freshBlockId :: String -> UniqSM BlockId
freshBlockId _ = do { u <- getUniqueUs; return $ BlockId u }
-_unused :: FS.FastString
-_unused = undefined
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))
where pprBlock (Block id tail) = ppr id <> colon $$ ppr tail
blocks = postorder_dfs_from blockenv tail
-_unused :: FS.FastString
-_unused = undefined
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
import Unique
import UniqSet
import Outputable
+import FastString
\end{code}
import Outputable
import ListSetOps
import Util
+import FastString
\end{code}
import Constants
import StaticFlags
import Outputable
+import FastString
import Control.Monad
import Constants
import PackageConfig
import Outputable
+import FastString
import Data.List
\end{code}
import SMRep
import Constants
import Outputable
+import FastString
-- ---------------------------------------------------------------------------
-- Code generation for PrimOps
}
\end{code}
-Some things are unused.
-\begin{code}
-_unused :: FS.FastString
-_unused = undefined
-\end{code}
import StaticFlags
import Constants
import Outputable
+import FastString
import Data.Word
\end{code}
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
import ListSetOps
import DynFlags
import Outputable
+import FastString
import Util
import Data.Maybe
\end{code}
import Util
import Outputable
import MonadUtils
+import FastString
\end{code}
-- ---------------------------------------------------------------------------
import Maybes
import Outputable
import PprCore () -- Instances
+import FastString
import Data.List
\end{code}
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
import PrelNames
import Bag
import FastTypes
+import FastString
import Outputable
\end{code}
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 )
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 )
import DynFlags
import ErrUtils
import MonadUtils
+import FastString
import Data.IORef
\end{code}
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
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 )
import TysWiredIn
import Outputable
+import FastString
import Panic
#ifndef GHCI_TABLES_NEXT_TO_CODE
import Util
import Var
import Bag
+import FastString
\end{code}
%************************************************************************
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
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.
import SrcLoc
import StaticFlags
import Outputable
+import FastString
\end{code}
import BinIface
import Panic
import Util
+import FastString
import Control.Monad
import Data.List
import SrcLoc
import DynFlags
import Util
-import Control.Monad
+import FastString
+import Control.Monad
import Data.List
import Data.Maybe
\end{code}
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
-- 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"
import SrcLoc
import Data.List
import CmdLineParser
+import FastString
import ErrUtils ( debugTraceMsg, putMsg )
import ParserCoreUtils ( getCoreModuleName )
import SrcLoc ( unLoc )
import SrcLoc ( Located(..) )
+import FastString
import Control.Exception as Exception
import Data.IORef ( readIORef, writeIORef, IORef )
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
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 )
import Maybes ( expectJust, mapCatMaybes )
import HaddockParse
import HaddockLex ( tokenise )
+import FastString
import Control.Concurrent
import System.Directory ( getModificationTime, doesFileExist,
\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
import SrcLoc ( SrcSpan, Located )
import LazyUniqFM ( lookupUFM, eltsUFM, emptyUFM )
import UniqSupply ( UniqSupply )
-import FastString ( FastString )
+import FastString
import StringBuffer ( StringBuffer )
import System.FilePath
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.
import Var
import Name
import Outputable
+import FastString
-- -----------------------------------------------------------------------------
-- Pretty-printing entities that we get from the GHC API
import CmdLineParser
import Config
-import FastString ( FastString, mkFastString )
+import FastString
import Util
import Maybes ( firstJust )
import Panic
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}
import Data.List ( partition )
import Data.Maybe ( isJust )
import Data.IORef ( IORef, readIORef, writeIORef )
-
-_dummy :: FS.FastString
-_dummy = FSLIT("")
\end{code}
import Panic ( panic )
import DynFlags
+import FastString
-- The most important function here is cmmMakeDynamicReference.
import UniqSupply
import Outputable
import State
+import FastString
import Data.Maybe
import Data.List
import UniqSupply
import Bag
import State
+import FastString
import Data.List
import Data.Maybe
#include "HsVersions.h"
-import FastString ( FastString, unpackFS )
+import FastString
import Char ( isAlphaNum )
import Binary
import Outputable
import Unique ( mkAlphaTyVarUnique, pprUnique )
import PrelNames
import StaticFlags
-import FastString ( FastString, mkFastString )
+import FastString
import Outputable
import Char ( ord, chr )
\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
import Digraph ( SCC(..), stronglyConnComp )
import Bag
import Outputable
+import FastString
import Maybes ( orElse )
import Util ( filterOut )
import Monad ( foldM, unless )
import BasicTypes ( DeprecTxt, Fixity )
import DriverPhases ( isHsBoot )
import Util
+import FastString
import ListSetOps
import Data.List ( partition, concatMap, (\\), delete )
import IO ( openFile, IOMode(..) )
import LazyUniqFM
import OccName
import Outputable
+import FastString
import SrcLoc ( Located(..), unLoc, noLoc )
import DynFlags ( DynFlag(..) )
import Maybe ( isNothing )
import BasicTypes ( compareFixity, funTyFixity, negateFixity,
Fixity(..), FixityDirection(..) )
import Outputable
+import FastString
#include "HsVersions.h"
\end{code}
import BasicTypes ( isAlwaysActive )
import Util ( lengthExceeds )
import UniqFM
+import FastString
import Data.List
\end{code}
import UniqSupply ( UniqSupply )
import List ( partition )
import Outputable
+import FastString
\end{code}
-----------------
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
import Util
import MonadUtils
import Outputable
+import FastString
import Data.List
\end{code}
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
import Util
import MonadUtils
import Outputable
+import FastString
import List( nub )
\end{code}
import Maybes ( orElse )
import Data.List ( mapAccumL )
import Outputable
+import FastString
\end{code}
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
\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
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
import Module
import Outputable
import MonadUtils
+import FastString
import Util
\end{code}
import Util ( zipEqual, equalLength )
import SrcLoc ( srcLocSpan )
import Outputable
+import FastString
import Control.Monad
\end{code}
import Bitmap
import StaticFlags ( opt_SccProfilingOn )
import Module
+import FastString
\end{code}
%************************************************************************
import Unique
import Util ( zipWithEqual, notNull )
import Outputable
+import FastString
import List ( zipWith4 )
\end{code}
import Outputable
import LazyUniqFM
import FiniteMap
+import FastString
import Maybe
import Monad
import {-# SOURCE #-} TcExpr( tcPolyExpr )
import {-# SOURCE #-} TcUnify( boxyUnify, unifyType )
-import FastString(FastString)
+import FastString
import HsSyn
import TcHsSyn
import TcRnMonad
import SrcLoc
import Outputable
+import FastString
import Util
import Control.Monad
import Util
import BasicTypes
import Outputable
+import FastString
import Control.Monad
\end{code}
import SrcLoc
import Maybe
import Outputable
+import FastString
\end{code}
\begin{code}
import Util
import ListSetOps
import Outputable
+import FastString
import Bag
\end{code}
import SrcLoc
import Outputable
import Maybes
+import FastString
\end{code}
import SrcLoc
import Bag
import Unique
+import FastString
\end{code}
\begin{code}
import TcType
import Unique
import UniqFM
+import FastString
\end{code}
import Util
import Bag
import Outputable
+import FastString
\end{code}
\begin{code}
import SrcLoc
import UniqSupply
import Outputable
+import FastString
import Control.Monad
\end{code}
import UniqSupply
import SrcLoc
import Outputable
+import FastString
import Control.Monad ( when, unless )
import Data.List ( (\\) )
import Outputable
import Util
import SrcLoc
+import FastString
import Control.Monad
\end{code}
import Outputable
import ListSetOps
import FiniteMap
+import FastString
import Data.Maybe
import Data.List
import Name
import SrcLoc
import Outputable
+import FastString
\end{code}
\begin{code}
import UniqSet
import SrcLoc
import DynFlags
+import FastString
import Control.Monad
import Data.List
import ListSetOps
import Digraph
import DynFlags
+import FastString
import Data.List
import Control.Monad ( mplus )
import Outputable
import SrcLoc ( Located(..) )
import Maybes
+import FastString
-- standard
import Data.List
import Maybes
import ListSetOps
import Outputable
+import FastString
import Data.List
import Data.IORef
import Util
import Outputable
import Unique
+import FastString
import Control.Monad
\end{code}
import BasicTypes
import Unique
import Outputable
+import FastString
\end{code}
%************************************************************************
import Unique
import BasicTypes
import Outputable
-
+import FastString
type Coercion = Type
type CoercionKind = Kind -- A CoercionKind is always of form (ty1 :=: ty2)
--------------------------------------
-- ...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
import Outputable
import Maybes
import Util
+import FastString
import Maybe
\end{code}
import VarEnv
import Outputable
import Util
+import FastString
+
import Data.Maybe ( isJust )
\end{code}
import BasicTypes
import UniqFM
import Id
+import FastString
import Data.Maybe ( isJust, isNothing )
\end{code}
import StaticFlags
import Util
import Outputable
+import FastString
import Data.List
import Data.Maybe ( isJust )
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
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"
------------------------------------------------------------------------------
zDecodeString
) where
-#define COMPILING_FAST_STRING
#include "HsVersions.h"
import Foreign
import Data.Char ( ord, chr, isDigit, digitToInt, intToDigit,
global, Global
) where
-#define COMPILING_FAST_STRING
#include "HsVersions.h"
import FastTypes
ptrStrLength
) where
--- This #define suppresses the "import FastString" that
--- HsVersions otherwise produces
-#define COMPILING_FAST_STRING
#include "HsVersions.h"
import Encoding
FastPtr, pBox, pUnbox, castFastPtr
) where
-#define COMPILING_FAST_STRING
#include "HsVersions.h"
#if defined(__GLASGOW_HASKELL__)
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
+
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
use_snd _ b = b
\end{code}
-\begin{code}
-_unused :: FS.FastString
-_unused = undefined
-\end{code}
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
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
import Digraph ( SCC(..), stronglyConnComp )
import Outputable
+import FastString
import Control.Monad ( liftM, liftM2, zipWithM, zipWithM_, mapAndUnzipM )
import Data.List ( inits, tails, zipWith4, zipWith5 )