Commit 1e50fd41 authored by Ian Lynagh's avatar Ian Lynagh

Remove GHC's haskell98 dependency

parent 52cacd61
......@@ -49,9 +49,9 @@ import FastTypes
import FastString
import BasicTypes
import Binary
import Ratio
import Data.Int
import Data.Ratio
import Data.Word
import Data.Char
\end{code}
......
......@@ -23,7 +23,7 @@ import CgUtils (callerSaveVolatileRegs)
import ClosureInfo
import Maybes
import List
import Data.List
import Panic
import Unique
......
......@@ -27,11 +27,11 @@ import FastString
import FiniteMap
import ForeignCall
import IdInfo
import List (sortBy)
import Data.List
import Maybes
import MkZipCfg
import MkZipCfgCmm hiding (CmmAGraph, CmmBlock, CmmTopZ, CmmZ, CmmGraph)
import Monad
import Control.Monad
import Name
import Outputable
import SMRep
......
......@@ -31,7 +31,7 @@ import UniqSupply
import UniqSet
import Unique
import Monad
import Control.Monad
-----------------------------------------------------------------------------
-- |Top level driver for the CPS pass
......
......@@ -23,7 +23,7 @@ import ForeignCall
import Constants
import StaticFlags
import Unique
import Maybe
import Data.Maybe
import FastString
import Panic
......
......@@ -20,8 +20,8 @@ import DynFlags
import ErrUtils
import FiniteMap
import HscTypes
import Maybe
import Monad
import Data.Maybe
import Control.Monad
import Outputable
import StaticFlags
......
......@@ -11,10 +11,10 @@ import ZipCfg
import ZipCfgCmmRep
import Data.Bits
import qualified Data.List as List
import Data.Word
import FastString
import List hiding (iterate)
import Monad
import Control.Monad
import Outputable
import UniqFM
import Unique
......@@ -56,7 +56,7 @@ type State = (UniqFM [CmmBlock], BidMap)
common_block :: (Outputable h, Uniquable h) => State -> (h, CmmBlock) -> (Bool, State)
common_block (bmap, subst) (hash, b) =
case lookupUFM bmap hash of
Just bs -> case (find (eqBlockBodyWith (eqBid subst) b) bs,
Just bs -> case (List.find (eqBlockBodyWith (eqBid subst) b) bs,
lookupBlockEnv subst bid) of
(Just b', Nothing) -> addSubst b'
(Just b', Just b'') | blockId b' /= b'' -> addSubst b'
......
......@@ -14,7 +14,7 @@ import ZipCfg
import ZipCfgCmmRep
import Maybes
import Monad
import Control.Monad
import Outputable
import Prelude hiding (unzip, zip)
import Util
......
......@@ -13,7 +13,7 @@ import PprCmm()
import qualified ZipCfg as G
import FastString
import Monad
import Control.Monad
import Outputable
import UniqSupply
......
......@@ -19,13 +19,13 @@ module CmmLint (
import BlockId
import Cmm
import CLabel
import Maybe
import Outputable
import PprCmm
import Constants
import FastString
import Control.Monad
import Data.Maybe
-- -----------------------------------------------------------------------------
-- Exported entry points:
......
......@@ -11,7 +11,7 @@ import BlockId
import CmmExpr
import CmmTx
import DFMonad
import Monad
import Control.Monad
import PprCmm()
import PprCmmZ()
import ZipCfg
......
......@@ -16,11 +16,11 @@ import CmmLiveZ
import CmmTx
import DFMonad
import FiniteMap
import List (sortBy)
import Data.List (sortBy)
import Maybes
import MkZipCfg
import MkZipCfgCmm hiding (CmmBlock, CmmGraph, CmmTopZ)
import Monad
import Control.Monad
import Outputable
import UniqSet
import UniqSupply
......
......@@ -23,12 +23,12 @@ import ZipCfg
import ZipCfgCmmRep
import ZipDataflow
import Monad
import Control.Monad
import Outputable hiding (empty)
import qualified Outputable as PP
import UniqSet
import Maybe
import Data.Maybe
import Prelude hiding (zip)
-- The point of this module is to insert spills and reloads to
......
......@@ -16,7 +16,7 @@ import FiniteMap
import Maybes
import MkZipCfg
import MkZipCfgCmm hiding (CmmBlock, CmmGraph)
import Monad
import Control.Monad
import Outputable
import SMRep (ByteOff)
import ZipCfg
......
......@@ -17,7 +17,7 @@ import ZipCfg
--import GHC.Exts (State#)
import Panic
import Data.IORef
import Monad
import Control.Monad
import StaticFlags (opt_Fuel)
import UniqSupply
......
......@@ -12,7 +12,7 @@ import qualified ZipCfgCmmRep as G
import qualified ZipCfg as Z
import CmmZipUtil
import Maybe
import Data.Maybe
import FastString
----------------------------------------------------------------
......
......@@ -45,7 +45,7 @@ import PprCmm()
import Outputable hiding (empty)
import Maybe
import Data.Maybe
import Prelude hiding (zip, unzip, last)
-------------------------------------------------------------------------
......
......@@ -36,7 +36,7 @@ import Util
import BasicTypes
import Maybes
import Monad
import Control.Monad
import Outputable
import Prelude hiding (zip, unzip, last)
import SMRep (ByteOff)
......
......@@ -20,9 +20,9 @@ import ClosureInfo
import FastString
import HscTypes
import Panic
import Char
import BasicTypes
import Data.Char
import Data.Word
cgTickBox :: Module -> Int -> Code
......
......@@ -36,7 +36,7 @@ import CLabel
import StgSyn
import CostCentre
import Id
import Monad (foldM, liftM)
import Control.Monad
import Name
import Module
import ListSetOps
......
......@@ -38,7 +38,7 @@ import Literal
import PrelInfo
import Outputable
import Util ( lengthIs )
import Char ( ord )
import Data.Char
---------------------------------------------------------------
......
......@@ -41,7 +41,7 @@ import FastString
import PprCmm ( {- instance Outputable -} )
import Id
import VarEnv
import Monad
import Control.Monad
import Name
import StgSyn
import Outputable
......
......@@ -19,7 +19,7 @@ import Module
import CmmUtils
import FastString
import HscTypes
import Char
import Data.Char
import StaticFlags
import BasicTypes
......
......@@ -28,8 +28,8 @@ import ForeignCall
import DynFlags
import FastString
import IO
import Data.Char
import System.IO
emitExternalCore :: DynFlags -> CgGuts -> IO ()
emitExternalCore dflags cg_guts
......
......@@ -9,7 +9,7 @@ import Encoding
import ExternalCore
import Pretty
import Char
import Data.Char
instance Show Module where
showsPrec _ m = shows (pmodule m)
......
......@@ -11,7 +11,7 @@ import HsSyn
import Module
import Outputable
import DynFlags
import Monad
import Control.Monad
import SrcLoc
import ErrUtils
import Name
......
......@@ -31,7 +31,7 @@ import PrelNames
import TysWiredIn
import Literal
import SrcLoc
import Ratio
import Data.Ratio
import Outputable
import Util
import FastString
......
......@@ -72,7 +72,7 @@ Library
array >= 0.1 && < 0.3
Build-Depends: filepath >= 1 && < 1.2
Build-Depends: haskell98, Cabal, hpc
Build-Depends: Cabal, hpc
if os(windows)
Build-Depends: Win32
else
......
......@@ -22,7 +22,7 @@ import Type
import TysWiredIn
import BasicTypes as Hs
import ForeignCall
import List
import Data.List
import Unique
import MonadUtils
import ErrUtils
......
......@@ -33,10 +33,11 @@ import Outputable
import Module
import Maybes ( firstJust )
import Directory ( doesFileExist )
import Monad ( when )
import IO
import Control.Exception
import Control.Monad
import System.Directory
import System.FilePath
import System.IO
\end{code}
%************************************************************************
......
......@@ -11,10 +11,11 @@ module HscStats ( ppSourceStats ) where
import HsSyn
import Outputable
import SrcLoc
import Char
import Bag
import Util
import RdrName
import Data.Char
\end{code}
%************************************************************************
......
......@@ -61,7 +61,7 @@ import Data.List
import qualified System.Posix.Internals
#else /* Must be Win32 */
import Foreign
import CString ( CString, peekCString )
import Foreign.C.String
#endif
import System.Process ( runInteractiveProcess, getProcessExitCode )
......
......@@ -81,7 +81,6 @@ import State
import UniqFM
import Unique ( Unique, getUnique )
import UniqSupply
import List ( groupBy, sortBy )
import DynFlags
#if powerpc_TARGET_ARCH
import StaticFlags ( opt_Static, opt_PIC )
......
......@@ -26,7 +26,7 @@ import RdrName
import SrcLoc
import DynFlags
import Char
import Data.Char
import Numeric
import System.IO.Unsafe
}
......
......@@ -3,7 +3,7 @@ module LexCore where
import ParserCoreUtils
import Panic
import Char
import Data.Char
import Numeric
isNameChar :: Char -> Bool
......
......@@ -57,7 +57,6 @@ module Lexer (
import Bag
import ErrUtils
import Maybe
import Outputable
import StringBuffer
import FastString
......@@ -71,6 +70,7 @@ import Control.Monad
import Data.Bits
import Data.Char
import Data.List
import Data.Maybe
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ratio
......
......@@ -29,7 +29,7 @@ import TysPrim( wordPrimTyCon, intPrimTyCon, charPrimTyCon,
import TyCon ( TyCon, tyConName )
import FastString
import Outputable
import Char
import Data.Char
import Unique
#include "../HsVersions.h"
......
module ParserCoreUtils where
import IO
import System.IO
data ParseResult a = OkP a | FailP String
type P a = String -> Int -> ParseResult a
......
......@@ -25,9 +25,10 @@ module ForeignCall (
) where
import FastString
import Char ( isAlphaNum )
import Binary
import Outputable
import Data.Char
\end{code}
......
......@@ -38,7 +38,7 @@ import Type ( funTyCon )
import TyCon ( tyConName )
import Util ( isIn )
import Array ( Array, array, (!) )
import Data.Array
\end{code}
%************************************************************************
......
......@@ -58,7 +58,7 @@ import StaticFlags
import FastString
import Outputable
import Char ( ord, chr )
import Data.Char
\end{code}
%************************************************************************
......
......@@ -86,7 +86,7 @@ import Coercion ( unsafeCoercionTyCon, symCoercionTyCon,
import TypeRep ( mkArrowKinds, liftedTypeKind, ubxTupleKind )
import Unique ( incrUnique, mkTupleTyConUnique,
mkTupleDataConUnique, mkPArrDataConUnique )
import Array
import Data.Array
import FastString
import Outputable
......
......@@ -42,7 +42,7 @@ import Outputable
import FastString
import Data.List ( partition )
import Maybes ( orElse )
import Monad ( foldM, unless )
import Control.Monad
\end{code}
-- ToDo: Put the annotations into the monad, so that they arrive in the proper
......
......@@ -64,10 +64,10 @@ import Outputable
import Util
import Maybes
import ListSetOps ( removeDups )
import List ( nubBy )
import DynFlags
import FastString
import Control.Monad
import Data.List
import qualified Data.Set as Set
\end{code}
......
......@@ -41,15 +41,13 @@ import NameSet
import RdrName
import LoadIface ( loadInterfaceForName )
import UniqSet
import List ( nub )
import Data.List
import Util ( isSingleton )
import ListSetOps ( removeDups )
import Maybes ( expectJust )
import Outputable
import SrcLoc
import FastString
import List ( unzip4 )
\end{code}
......
......@@ -38,8 +38,8 @@ import FastString
import ListSetOps
import Data.List ( partition, (\\), delete )
import qualified Data.Set as Set
import IO ( openFile, IOMode(..) )
import Monad ( when, mplus )
import System.IO
import Control.Monad
\end{code}
......
......@@ -42,12 +42,12 @@ import Bag
import FastString
import SrcLoc
import DynFlags ( DynFlag(..) )
import Maybe ( isNothing )
import BasicTypes ( Boxity(..) )
import ListSetOps (findDupsEq)
import Control.Monad
import Data.Maybe
\end{code}
\begin{code}
......
......@@ -19,7 +19,7 @@ import Type ( isUnLiftedType )
import SetLevels ( Level(..), LevelledExpr, LevelledBind,
setLevels, ltMajLvl, ltLvl, isTopLvl )
import UniqSupply ( UniqSupply )
import List ( partition )
import Data.List
import Outputable
import FastString
\end{code}
......
......@@ -61,10 +61,10 @@ import FastString
import Util
import UniqSupply ( UniqSupply, mkSplitUniqSupply, splitUniqSupply )
import IO ( hPutStr, stderr )
import Outputable
import Control.Monad
import List ( partition, intersperse )
import Data.List
import System.IO
import Maybes
\end{code}
......
......@@ -52,7 +52,7 @@ import MonadUtils
import Outputable
import FastString
import List( nub )
import Data.List
\end{code}
......
......@@ -38,13 +38,13 @@ import StaticFlags ( opt_SpecInlineJoinPoints )
import BasicTypes ( Activation(..) )
import Maybes ( orElse, catMaybes, isJust, isNothing )
import Util
import List ( nubBy, partition )
import UniqSupply
import Outputable
import FastString
import UniqFM
import MonadUtils
import Control.Monad ( zipWithM )
import Data.List
\end{code}
-----------------------------------------------------
......
......@@ -20,7 +20,7 @@ import FiniteMap
import FastString
import Maybes
import Monad
import Control.Monad
\end{code}
......
......@@ -45,12 +45,12 @@ import Util
import ListSetOps
import SrcLoc
import Maybes
import List
import BasicTypes
import Bag
import FastString
import Control.Monad
import Data.List
\end{code}
......
......@@ -18,7 +18,7 @@ import TcType
import PrelNames
import DynFlags
import SrcLoc
import Maybe
import Data.Maybe
import Outputable
import FastString
\end{code}
......
......@@ -42,7 +42,7 @@ import ErrUtils
import Util
import Outputable
import FastString
import Monad
import Control.Monad
\end{code}
......
......@@ -25,7 +25,7 @@ module TcRnDriver (
tcRnExtCore
) where
import IO
import System.IO
#ifdef GHCI
import {-# SOURCE #-} TcSplice ( tcSpliceDecls )
#endif
......
......@@ -64,7 +64,7 @@ import ErrUtils
import SrcLoc
import Outputable
import Unique
import Maybe
import Data.Maybe
import BasicTypes
import Panic
import FastString
......
......@@ -37,7 +37,6 @@ import VarSet
import Name
import Outputable
import Maybes
import Monad
import Unify
import Util
import SrcLoc
......@@ -49,6 +48,7 @@ import Unique ( mkBuiltinUnique )
import BasicTypes