Module header tidyup #2
authorSimon Marlow <simonmar@microsoft.com>
Wed, 11 Oct 2006 14:35:23 +0000 (14:35 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 11 Oct 2006 14:35:23 +0000 (14:35 +0000)
Push this further along, and fix build problems in the first patch.

38 files changed:
compiler/HsVersions.h
compiler/main/DriverMkDepend.hs
compiler/main/DriverPipeline.hs
compiler/main/DynFlags.hs
compiler/main/ErrUtils.lhs
compiler/main/Finder.lhs
compiler/main/HeaderInfo.hs
compiler/main/Main.hs
compiler/main/Packages.lhs
compiler/main/ParsePkgConf.y
compiler/main/StaticFlags.hs
compiler/main/SysTools.lhs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachCodeGen.hs
compiler/nativeGen/MachInstrs.hs
compiler/nativeGen/PprMach.hs
compiler/nativeGen/RegisterAlloc.hs
compiler/parser/Ctype.lhs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/utils/Bag.lhs
compiler/utils/Binary.hs
compiler/utils/BufWrite.hs
compiler/utils/Digraph.lhs
compiler/utils/FastMutInt.lhs
compiler/utils/FastTypes.lhs
compiler/utils/FiniteMap.lhs
compiler/utils/IOEnv.hs
compiler/utils/ListSetOps.lhs
compiler/utils/Maybes.lhs
compiler/utils/OrdList.lhs
compiler/utils/Outputable.lhs
compiler/utils/Panic.lhs
compiler/utils/Pretty.lhs
compiler/utils/StringBuffer.lhs
compiler/utils/UniqFM.lhs
compiler/utils/UniqSet.lhs
compiler/utils/Util.lhs

index 68884c0..f11aa21 100644 (file)
@@ -22,6 +22,12 @@ you will screw up the layout where they are used in case expressions!
  * settings for the target plat instead). */
 #include "../includes/ghcautoconf.h"
 
+#if __GLASGOW_HASKELL__ >= 602
+#define SYSTEM_IO_ERROR System.IO.Error
+#else
+#define SYSTEM_IO_ERROR System.IO
+#endif
+
 #ifdef __GLASGOW_HASKELL__
 #define GLOBAL_VAR(name,value,ty)  \
 name = Util.global (value) :: IORef (ty); \
index 56f57f0..74c8037 100644 (file)
@@ -34,14 +34,14 @@ import Panic                ( catchJust, ioErrors )
 #endif
 import ErrUtils         ( debugTraceMsg, printErrorsAndWarnings )
 
-import DATA_IOREF      ( IORef, readIORef, writeIORef )
-import EXCEPTION
-
-import System          ( ExitCode(..), exitWith )
-import Directory
-import IO
-import Monad            ( when )
-import Maybe            ( isJust )
+import Data.IORef      ( IORef, readIORef, writeIORef )
+import Control.Exception
+import System.Exit     ( ExitCode(..), exitWith )
+import System.Directory
+import System.IO
+import SYSTEM_IO_ERROR  ( isEOFError )
+import Control.Monad    ( when )
+import Data.Maybe       ( isJust )
 
 -----------------------------------------------------------------
 --
index 690328d..9e33f51 100644 (file)
@@ -50,17 +50,18 @@ import ParserCoreUtils      ( getCoreModuleName )
 import SrcLoc          ( unLoc )
 import SrcLoc          ( Located(..) )
 
-import EXCEPTION
-import DATA_IOREF      ( readIORef, writeIORef, IORef )
-import GLAEXTS         ( Int(..) )
-
-import Directory
-import System
-import IO
-import Monad
+import Control.Exception as Exception
+import Data.IORef      ( readIORef, writeIORef, IORef )
+import GHC.Exts                ( Int(..) )
+import System.Directory
+import System.IO
+import SYSTEM_IO_ERROR as IO
+import Control.Monad
 import Data.List       ( isSuffixOf )
-import Maybe
-
+import Data.Maybe
+import System.Exit
+import System.Cmd
+import System.Environment
 
 -- ---------------------------------------------------------------------------
 -- Pre-process
@@ -1133,7 +1134,7 @@ checkProcessArgsResult flags filename
 
 getHCFilePackages :: FilePath -> IO [PackageId]
 getHCFilePackages filename =
-  EXCEPTION.bracket (openFile filename ReadMode) hClose $ \h -> do
+  Exception.bracket (openFile filename ReadMode) hClose $ \h -> do
     l <- hGetLine h
     case l of
       '/':'*':' ':'G':'H':'C':'_':'P':'A':'C':'K':'A':'G':'E':'S':rest ->
index 9a8804a..20376f0 100644 (file)
@@ -69,20 +69,20 @@ import UniqFM           ( UniqFM )
 import Util            ( notNull, splitLongestPrefix, normalisePath )
 import Maybes          ( fromJust, orElse )
 import SrcLoc           ( SrcSpan )
+import Outputable
+import {-# SOURCE #-} ErrUtils ( Severity(..), Message, mkLocMessage )
 
-import DATA_IOREF      ( readIORef )
-import EXCEPTION       ( throwDyn )
-import Monad           ( when )
+import Data.IORef      ( readIORef )
+import Control.Exception ( throwDyn )
+import Control.Monad   ( when )
 #ifdef mingw32_TARGET_OS
 import Data.List       ( isPrefixOf )
 #else
 import Util            ( split )
 #endif
 
-import Char            ( isDigit, isUpper )
-import Outputable
+import Data.Char       ( isDigit, isUpper )
 import System.IO        ( hPutStrLn, stderr )
-import {-# SOURCE #-} ErrUtils ( Severity(..), Message, mkLocMessage )
 
 -- -----------------------------------------------------------------------------
 -- DynFlags
index 7bdb019..4f8fa14 100644 (file)
@@ -37,9 +37,10 @@ import qualified Pretty
 import SrcLoc          ( srcSpanStart, noSrcSpan )
 import DynFlags                ( DynFlags(..), DynFlag(..), dopt )
 import StaticFlags     ( opt_ErrorSpans )
-import System          ( ExitCode(..), exitWith )
-import IO              ( hPutStrLn, stderr )
-import DYNAMIC
+
+import System.Exit     ( ExitCode(..), exitWith )
+import System.IO       ( hPutStrLn, stderr )
+import Data.Dynamic
 
 
 -- -----------------------------------------------------------------------------
index 1f047fa..df1fa3e 100644 (file)
@@ -37,13 +37,12 @@ import FiniteMap
 import UniqFM
 import Maybes          ( expectJust )
 
-import DATA_IOREF      ( IORef, writeIORef, readIORef, modifyIORef )
-
+import Data.IORef      ( IORef, writeIORef, readIORef, modifyIORef )
 import Data.List
 import System.Directory
 import System.IO
 import Control.Monad
-import Time            ( ClockTime )
+import System.Time     ( ClockTime )
 
 
 type FileExt = String  -- Filename extension
index 48eda22..1566137 100644 (file)
@@ -35,9 +35,9 @@ import Bag            ( emptyBag, listToBag )
 
 import Distribution.Compiler
 
-import EXCEPTION       ( throwDyn )
-import IO
-import List
+import Control.Exception
+import System.IO
+import Data.List
 
 #if __GLASGOW_HASKELL__ >= 601
 import System.IO               ( openBinaryFile )
index 55234e7..f7c5be7 100644 (file)
@@ -41,13 +41,14 @@ import Util
 import Panic
 
 -- Standard Haskell libraries
-import EXCEPTION       ( throwDyn )
-import IO
-import Directory       ( doesDirectoryExist )
-import System          ( getArgs, exitWith, ExitCode(..) )
-import Monad
-import List
-import Maybe
+import Control.Exception ( throwDyn )
+import System.IO
+import System.Directory        ( doesDirectoryExist )
+import System.Environment
+import System.Exit
+import Control.Monad
+import Data.List
+import Data.Maybe
 
 -----------------------------------------------------------------------------
 -- ToDo:
index bbaf846..fb54a12 100644 (file)
@@ -42,15 +42,12 @@ import Config               ( cProjectVersion )
 import Name            ( Name, nameModule_maybe )
 import UniqFM
 import Module
-import UniqSet
 import Util
 import Maybes          ( expectJust, MaybeErr(..) )
 import Panic
 import Outputable
 
-#if __GLASGOW_HASKELL__ >= 603
-import System.Directory        ( getAppUserDataDirectory )
-#else
+#if __GLASGOW_HASKELL__ < 603
 import Compat.Directory        ( getAppUserDataDirectory )
 #endif
 
@@ -58,15 +55,15 @@ import System.Environment ( getEnv )
 import Distribution.InstalledPackageInfo
 import Distribution.Package
 import Distribution.Version
-import System.Directory        ( doesFileExist, doesDirectoryExist,
-                         getDirectoryContents )
-import Data.Maybe      ( catMaybes )
-import Control.Monad   ( foldM )
-import Data.List       ( nub, partition, sortBy, isSuffixOf )
 import FastString
-import EXCEPTION       ( throwDyn )
 import ErrUtils         ( debugTraceMsg, putMsg, Message )
 
+import System.Directory
+import Data.Maybe
+import Control.Monad
+import Data.List
+import Control.Exception        ( throwDyn )
+
 -- ---------------------------------------------------------------------------
 -- The Package state
 
index 901a5bc..e29eb94 100644 (file)
@@ -12,7 +12,7 @@ import ErrUtils  ( mkLocMessage )
 import SrcLoc
 import Outputable
 import Panic     ( GhcException(..) )
-import EXCEPTION ( throwDyn )
+import Control.Exception ( throwDyn )
 
 }
 
index 9e1d8ad..4f4fe66 100644 (file)
@@ -76,11 +76,11 @@ import Util
 import Maybes          ( firstJust )
 import Panic           ( GhcException(..), ghcError )
 
-import EXCEPTION       ( throwDyn )
-import DATA_IOREF
-import UNSAFE_IO       ( unsafePerformIO )
-import Monad           ( when )
-import Char            ( isDigit )
+import Control.Exception ( throwDyn )
+import Data.IORef
+import System.IO.Unsafe        ( unsafePerformIO )
+import Control.Monad   ( when )
+import Data.Char       ( isDigit )
 import Data.List       ( sort, intersperse, nub )
 
 -----------------------------------------------------------------------------
index 594407e..874387f 100644 (file)
@@ -37,31 +37,27 @@ module SysTools (
 
 #include "HsVersions.h"
 
-import DriverPhases     ( isHaskellUserSrcFilename )
+import DriverPhases
 import Config
 import Outputable
-import ErrUtils                ( putMsg, debugTraceMsg, showPass, Severity(..), Messages )
-import Panic           ( GhcException(..) )
-import Util            ( Suffix, global, notNull, consIORef, joinFileName,
-                         normalisePath, pgmPath, platformPath, joinFileExt )
-import DynFlags                ( DynFlags(..), DynFlag(..), dopt, Option(..),
-                         setTmpDir, defaultDynFlags )
-
-import EXCEPTION       ( throwDyn, finally )
-import DATA_IOREF      ( IORef, readIORef, writeIORef )
-import DATA_INT
-    
-import Monad           ( when, unless )
-import System          ( ExitCode(..), getEnv, system )
-import IO              ( try, catch, hGetContents,
-                         openFile, hPutStr, hClose, hFlush, IOMode(..), 
-                         stderr, ioError, isDoesNotExistError,
-                         isAlreadyExistsError )
-import Directory       ( doesFileExist, removeFile,
-                         createDirectory, removeDirectory )
-import Maybe           ( isJust )
-import List             ( partition )
-import FiniteMap ( FiniteMap, emptyFM, lookupFM, addToFM, eltsFM )
+import ErrUtils
+import Panic
+import Util
+import DynFlags
+import FiniteMap
+
+import Control.Exception
+import Data.IORef
+import Data.Int
+import Control.Monad
+import System.Exit
+import System.Cmd
+import System.Environment
+import System.IO
+import SYSTEM_IO_ERROR as IO
+import System.Directory
+import Data.Maybe
+import Data.List
 
 -- GHC <= 4.08 didn't have rawSystem, and runs into problems with long command
 -- lines on mingw32, so we disallow it now.
@@ -88,10 +84,8 @@ import Text.Regex
 -- rawSystem comes from libghccompat.a in stage1
 import Compat.RawSystem        ( rawSystem )
 import GHC.IOBase       ( IOErrorType(..) ) 
-import System.IO.Error  ( ioeGetErrorType )
 #else
 import System.Process  ( runInteractiveProcess, getProcessExitCode )
-import System.IO        ( hSetBuffering, hGetLine, BufferMode(..) )
 import Control.Concurrent( forkIO, newChan, readChan, writeChan )
 import Data.Char        ( isSpace )
 import FastString       ( mkFastString )
index 0e05fb8..875f790 100644 (file)
@@ -53,10 +53,10 @@ import FastString
 import List            ( intersperse )
 #endif
 
-import DATA_INT
-import DATA_WORD
-import DATA_BITS
-import GLAEXTS
+import Data.Int
+import Data.Word
+import Data.Bits
+import GHC.Exts
 
 {-
 The native-code generator has machine-independent and
index 1e88867..aaf7cec 100644 (file)
@@ -42,13 +42,13 @@ import Constants    ( wORD_SIZE )
 
 #ifdef DEBUG
 import Outputable      ( assertPanic )
-import TRACE           ( trace )
+import Debug.Trace     ( trace )
 #endif
 
 import Control.Monad   ( mapAndUnzipM )
-import Maybe           ( fromJust )
-import DATA_BITS
-import DATA_WORD
+import Data.Maybe      ( fromJust )
+import Data.Bits
+import Data.Word
 
 -- -----------------------------------------------------------------------------
 -- Top-level of the instruction selector
index 0f718d3..baac1cd 100644 (file)
@@ -43,7 +43,7 @@ import Outputable
 import FastString
 import Constants       ( wORD_SIZE )
 
-import GLAEXTS
+import GHC.Exts
 
 
 -- -----------------------------------------------------------------------------
index afa5bcd..274ea1f 100644 (file)
@@ -39,20 +39,15 @@ import qualified Outputable
 
 import StaticFlags      ( opt_PIC, opt_Static )
 
-#if __GLASGOW_HASKELL__ >= 504
 import Data.Array.ST
 import Data.Word       ( Word8 )
-#else
-import MutableArray
-#endif
-
-import MONAD_ST
-import Char            ( chr, ord )
-import Maybe            ( isJust )
+import Control.Monad.ST
+import Data.Char       ( chr, ord )
+import Data.Maybe       ( isJust )
 
 #if powerpc_TARGET_ARCH || darwin_TARGET_OS
-import DATA_WORD(Word32)
-import DATA_BITS
+import Data.Word(Word32)
+import Data.Bits
 #endif
 
 -- -----------------------------------------------------------------------------
index bbab518..36a098e 100644 (file)
@@ -100,13 +100,13 @@ import UniqSupply
 import Outputable
 
 #ifndef DEBUG
-import Maybe           ( fromJust )
+import Data.Maybe      ( fromJust )
 #endif
-import Maybe           ( fromMaybe )
-import List            ( nub, partition, mapAccumL, groupBy )
-import Monad           ( when )
-import DATA_WORD
-import DATA_BITS
+import Data.Maybe      ( fromMaybe )
+import Data.List       ( nub, partition, mapAccumL, groupBy )
+import Control.Monad   ( when )
+import Data.Word
+import Data.Bits
 
 -- -----------------------------------------------------------------------------
 -- Some useful types
index dbe4e9f..8d0b91b 100644 (file)
@@ -17,9 +17,9 @@ module Ctype
 
 #include "HsVersions.h"
 
-import DATA_INT                ( Int32 )
-import DATA_BITS       ( Bits((.&.)) )
-import Char            ( ord, chr )
+import Data.Int                ( Int32 )
+import Data.Bits       ( Bits((.&.)) )
+import Data.Char       ( ord, chr )
 \end{code}
 
 Bit masks
index 4806a8a..6a25ae5 100644 (file)
@@ -43,10 +43,10 @@ import DynFlags
 import Ctype
 import Util            ( maybePrefixMatch, readRational )
 
-import DATA_BITS
+import Data.Bits
 import Data.Char       ( chr, isSpace )
-import Ratio
-import TRACE
+import Data.Ratio
+import Debug.Trace
 
 #if __GLASGOW_HASKELL__ >= 605
 import Data.Char       ( GeneralCategory(..), generalCategory, isPrint, isUpper )
index 7166e1e..0209ec8 100644 (file)
@@ -42,10 +42,10 @@ import HaddockUtils
 
 import FastString
 import Maybes          ( orElse )
-import Monad            ( when )
 import Outputable
-import GLAEXTS
 
+import Control.Monad    ( when )
+import GHC.Exts
 import Data.Char
 import Control.Monad    ( mplus )
 }
index ea85a8c..d315c42 100644 (file)
@@ -1,7 +1,9 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-\section[Bags]{@Bag@: an unordered collection with duplicates}
+
+Bag: an unordered collection with duplicates
 
 \begin{code}
 module Bag (
@@ -20,7 +22,8 @@ module Bag (
 
 import Outputable
 import Util            ( isSingleton )
-import List            ( partition )
+
+import Data.List       ( partition )
 \end{code}
 
 
index 1d5ab0e..e479b79 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -cpp #-}
 --
--- (c) The University of Glasgow 2002
+-- (c) The University of Glasgow 2002-2006
 --
 -- Binary I/O library, with special tweaks for GHC
 --
@@ -59,7 +59,7 @@ import Unique
 import Panic
 import UniqFM
 import FastMutInt
-import PackageConfig           ( PackageId, packageIdFS, fsToPackageId )
+import PackageConfig
 
 import Foreign
 import Data.Array.IO
index a03db3d..049a698 100644 (file)
@@ -2,7 +2,7 @@
 --
 -- Fast write-buffered Handles
 --
--- (c) The University of Glasgow 2005
+-- (c) The University of Glasgow 2005-2006
 --
 -- This is a simple abstraction over Handles that offers very fast write
 -- buffering, but without the thread safety that Handles provide.  It's used
@@ -26,16 +26,16 @@ import FastString
 import FastMutInt
 import Panic           ( panic )
 
-import Monad           ( when )
-import Char            ( ord )
+import Control.Monad   ( when )
+import Data.Char       ( ord )
 import Foreign
-import IO
+import System.IO
 
 import GHC.IOBase      ( IO(..) )
 import System.IO       ( hPutBuf )
 import GHC.Ptr         ( Ptr(..) )
 
-import GLAEXTS         ( Int(..), Int#, Addr# )
+import GHC.Exts                ( Int(..), Int#, Addr# )
 
 -- -----------------------------------------------------------------------------
 
index 8fda332..669f718 100644 (file)
@@ -1,3 +1,7 @@
+%
+% (c) The University of Glasgow 2006
+%
+
 \begin{code}
 module Digraph(
 
@@ -34,22 +38,20 @@ module Digraph(
 
 
 import Util    ( sortLe )
+import Outputable
 
 -- Extensions
-import MONAD_ST
+import Control.Monad.ST
 
 -- std interfaces
-import Maybe
-import Array
-import List
-import Outputable
+import Data.Maybe
+import Data.Array
+import Data.List
 
 #if __GLASGOW_HASKELL__ > 604
 import Data.Array.ST
-#elif __GLASGOW_HASKELL__ >= 504
-import Data.Array.ST  hiding ( indices, bounds )
 #else
-import ST
+import Data.Array.ST  hiding ( indices, bounds )
 #endif
 \end{code}
 
index b483a14..86ca0bd 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -cpp #-}
 --
--- (c) The University of Glasgow 2002
+-- (c) The University of Glasgow 2002-2006
 --
 -- Unboxed mutable Ints
 
@@ -17,13 +17,8 @@ module FastMutInt(
 #endif
 
 
-#if __GLASGOW_HASKELL__ < 503
-import GlaExts
-import PrelIOBase
-#else
 import GHC.Base
 import GHC.IOBase
-#endif
 
 #if __GLASGOW_HASKELL__ < 411
 newByteArray# = newCharArray#
index bb92c8c..c58346d 100644 (file)
@@ -1,5 +1,5 @@
 %
-% (c) The University of Glasgow, 2000
+% (c) The University of Glasgow, 2000-2006
 %
 \section{Fast integers and booleans}
 
@@ -17,7 +17,7 @@ module FastTypes (
 #if defined(__GLASGOW_HASKELL__)
 
 -- Import the beggars
-import GLAEXTS
+import GHC.Exts
        ( Int(..), Int#, (+#), (-#), (*#), 
          quotInt#, negateInt#, (==#), (<#), (<=#), (>=#), (>#)
        )
index 9168d36..6ac6b09 100644 (file)
@@ -1,7 +1,7 @@
-
+%
+% (c) The University of Glasgow 2006
 % (c) The AQUA Project, Glasgow University, 1994-1998
 %
-\section[FiniteMap]{An implementation of finite maps}
 
 ``Finite maps'' are the heart of the compiler's
 lookup-tables/environments and its implementation of sets.  Important
@@ -62,7 +62,7 @@ import Bag      ( Bag, foldrBag )
 import Util
 import Outputable
 
-import GLAEXTS
+import GHC.Exts
 
 #if ! OMIT_NATIVE_CODEGEN
 #  define IF_NCG(a) a
index 8116eff..c0277ae 100644 (file)
@@ -1,4 +1,5 @@
--- (c) The University of Glasgow 2002
+--
+-- (c) The University of Glasgow 2002-2006
 --
 -- The IO Monad with an environment
 --
@@ -26,9 +27,10 @@ module IOEnv (
 #include "HsVersions.h"
 
 import Panic           ( try, tryUser, tryMost, Exception(..) )
-import DATA_IOREF      ( IORef, newIORef, readIORef, writeIORef )
-import UNSAFE_IO       ( unsafeInterleaveIO )
-import FIX_IO          ( fixIO )
+
+import Data.IORef      ( IORef, newIORef, readIORef, writeIORef )
+import System.IO.Unsafe        ( unsafeInterleaveIO )
+import System.IO       ( fixIO )
 
 
 ----------------------------------------------------------------------
index 0295072..becf9e6 100644 (file)
@@ -1,4 +1,5 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
 \section[ListSetOps]{Set-like operations on lists}
@@ -24,7 +25,8 @@ import Outputable
 import Unique  ( Unique )
 import UniqFM  ( eltsUFM, emptyUFM, addToUFM_C )
 import Util    ( isn'tIn, isIn, mapAccumR, sortLe )
-import List    ( partition )
+
+import Data.List ( partition )
 \end{code}
 
 
index f1f859a..7d1fa4e 100644 (file)
@@ -1,11 +1,11 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-\section[Maybes]{The `Maybe' types and associated utility functions}
 
 \begin{code}
 module Maybes (
-       module Maybe,           -- Re-export all of Maybe
+       module Data.Maybe,      -- Re-export all of Maybe
 
        MaybeErr(..),   -- Instance of Monad
        failME, isSuccess,
@@ -22,8 +22,7 @@ module Maybes (
 
 #include "HsVersions.h"
 
-import Maybe
-
+import Data.Maybe
 
 infixr 4 `orElse`
 \end{code}
index 7f22b38..7e797e0 100644 (file)
@@ -1,4 +1,5 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The AQUA Project, Glasgow University, 1993-1998
 %
 
index 30960dc..db744b1 100644 (file)
@@ -1,10 +1,10 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP Project, Glasgow University, 1992-1998
 %
-\section[Outputable]{Classes for pretty-printing}
 
-Defines classes for pretty-printing and forcing, both forms of
-``output.''
+Outputable: defines classes for pretty-printing and forcing, both
+forms of ``output.''
 
 \begin{code}
 
@@ -62,10 +62,9 @@ import qualified Pretty
 import Pretty          ( Doc, Mode(..) )
 import Panic
 
-import DATA_WORD       ( Word32 )
-
-import IO              ( Handle, stderr, stdout, hFlush )
-import Char             ( ord )
+import Data.Word       ( Word32 )
+import System.IO       ( Handle, stderr, stdout, hFlush )
+import Data.Char        ( ord )
 \end{code}
 
 
index 1a74d5d..42bf8b5 100644 (file)
@@ -1,7 +1,7 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The GRASP Project, Glasgow University, 1992-2000
 %
-\section{Panic error messages}
 
 Defines basic funtions for printing error messages.
 
@@ -39,24 +39,15 @@ import Posix                ( Handler(Catch), installHandler, sigINT, sigQUIT )
 import GHC.ConsoleHandler
 #endif
 
-# if __GLASGOW_HASKELL__ < 500
-import EXCEPTION        ( raiseInThread )
-# else
-import EXCEPTION       ( throwTo )
-# endif /* GHC < 500 */
-
-#if __GLASGOW_HASKELL__ > 408
-import EXCEPTION       ( catchJust, tryJust, ioErrors )
-#endif
-
-import CONCURRENT      ( myThreadId, MVar, ThreadId, withMVar, newEmptyMVar )
-import DYNAMIC
-import qualified EXCEPTION as Exception
-import TRACE           ( trace )
-import UNSAFE_IO       ( unsafePerformIO )
-import IO              ( isUserError )
-
-import System
+import Control.Exception hiding (try)
+import Control.Concurrent ( myThreadId, MVar, ThreadId, withMVar, newEmptyMVar )
+import Data.Dynamic
+import qualified Control.Exception as Exception
+import Debug.Trace     ( trace )
+import System.IO.Unsafe        ( unsafePerformIO )
+import System.IO.Error ( isUserError )
+import System.Exit
+import System.Environment
 \end{code}
 
 GHC's own exception type.
index ec8f1e7..31d65f2 100644 (file)
@@ -180,12 +180,10 @@ module Pretty (
 import BufWrite
 import FastString
 
-import GLAEXTS
+import GHC.Exts
 
 import Numeric (fromRat)
-import IO
-
-import System.IO       ( hPutBuf )
+import System.IO
 
 import GHC.Base                ( unpackCString# )
 import GHC.Ptr         ( Ptr(..) )
index e52e7e7..8eb6fc2 100644 (file)
@@ -1,7 +1,7 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The University of Glasgow, 1997-2006
 %
-\section{String buffers}
 
 Buffers for scanning string input stored in external arrays.
 
index 2a02dc7..267aeab 100644 (file)
@@ -1,7 +1,9 @@
-%ilter
+%
+% (c) The University of Glasgow 2006
 % (c) The AQUA Project, Glasgow University, 1994-1998
 %
-\section[UniqFM]{Specialised finite maps, for things with @Uniques@}
+
+UniqFM: Specialised finite maps, for things with @Uniques@
 
 Based on @FiniteMaps@ (as you would expect).
 
@@ -52,7 +54,7 @@ import Maybes         ( maybeToBool )
 import FastTypes
 import Outputable
 
-import GLAEXTS         -- Lots of Int# operations
+import GHC.Exts                -- Lots of Int# operations
 \end{code}
 
 %************************************************************************
index 129e333..7d83f6f 100644 (file)
@@ -1,4 +1,5 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The AQUA Project, Glasgow University, 1994-1998
 %
 \section[UniqSet]{Specialised sets, for things with @Uniques@}
index 522f795..3eff34b 100644 (file)
@@ -1,4 +1,5 @@
 %
+% (c) The University of Glasgow 2006
 % (c) The University of Glasgow 1992-2002
 %
 \section[Util]{Highly random utility functions}
@@ -82,26 +83,26 @@ module Util (
 import Panic           ( panic, trace )
 import FastTypes
 
-import EXCEPTION       ( Exception(..), finally, throwDyn, catchDyn, throw )
-import qualified EXCEPTION as Exception
-import DYNAMIC         ( Typeable )
-import DATA_IOREF      ( IORef, newIORef )
-import UNSAFE_IO       ( unsafePerformIO )
-import DATA_IOREF      ( readIORef, writeIORef )
+import Control.Exception ( Exception(..), finally, catchDyn, throw )
+import qualified Control.Exception as Exception
+import Data.Dynamic    ( Typeable )
+import Data.IORef      ( IORef, newIORef )
+import System.IO.Unsafe        ( unsafePerformIO )
+import Data.IORef      ( readIORef, writeIORef )
 
-import qualified List  ( elem, notElem )
+import qualified Data.List as List ( elem, notElem )
 
 #ifndef DEBUG
-import List            ( zipWith4 )
+import Data.List               ( zipWith4 )
 #endif
 
-import Monad           ( when )
-import IO              ( catch, isDoesNotExistError )
-import Directory       ( doesDirectoryExist, createDirectory )
-import Char            ( isUpper, isAlphaNum, isSpace, ord, isDigit )
-import Ratio           ( (%) )
-import Time            ( ClockTime )
-import Directory       ( getModificationTime )
+import Control.Monad   ( when )
+import SYSTEM_IO_ERROR as IO ( catch, isDoesNotExistError )
+import System.Directory        ( doesDirectoryExist, createDirectory,
+                          getModificationTime )
+import Data.Char       ( isUpper, isAlphaNum, isSpace, ord, isDigit )
+import Data.Ratio      ( (%) )
+import System.Time     ( ClockTime )
 
 infixr 9 `thenCmp`
 \end{code}