Commit c84ddf85 authored by dterei's avatar dterei

SafeHaskell: Update to work with safe base

parent e0eb7e7d
......@@ -29,9 +29,10 @@ module UniqSupply (
import Unique
import FastTypes
import GhcIO (unsafeDupableInterleaveIO)
import MonadUtils
import Control.Monad
import GHC.IO (unsafeDupableInterleaveIO)
\end{code}
......
......@@ -435,6 +435,7 @@ Library
FastTypes
Fingerprint
FiniteMap
GhcIO
GraphBase
GraphColor
GraphOps
......
......@@ -38,19 +38,18 @@ import Panic
import Outputable
-- Standard libraries
import GHC.Word ( Word(..) )
import Data.Array.Base
import GHC.Arr ( STArray(..) )
import Control.Monad ( zipWithM )
import Control.Monad.ST ( stToIO )
import GHC.Exts
import GHC.Arr ( Array(..) )
import GHC.Arr.Unsafe ( Array(..), STArray(..) )
import GHC.Base ( writeArray#, RealWorld, Int(..), Word# )
import GHC.IOBase ( IO(..) )
import GHC.Exts
import GHC.Ptr ( Ptr(..), castPtr )
import GHC.Base ( writeArray#, RealWorld, Int(..), Word# )
import GHC.Word ( Word(..) )
import Data.Word
\end{code}
......
......@@ -53,9 +53,9 @@ import DynFlags
import Outputable as Ppr
import FastString
import Constants ( wORD_SIZE )
import GHC.Arr ( Array(..) )
import GHC.Arr.Unsafe ( Array(..) )
import GHC.Exts
import GHC.IO ( IO(..) )
import GhcIO ( IO(..) )
import StaticFlags( opt_PprStyle_Debug )
import Control.Monad
......
......@@ -26,7 +26,7 @@ module BreakArray
) where
#ifdef GHCI
import GHC.Exts
import GHC.IO ( IO(..) )
import GhcIO ( IO(..) )
import Constants
data BreakArray = BA (MutableByteArray# RealWorld)
......
......@@ -314,9 +314,9 @@ gHC_CONC = mkBaseModule (fsLit "GHC.Conc")
gHC_IO = mkBaseModule (fsLit "GHC.IO")
gHC_IO_Exception = mkBaseModule (fsLit "GHC.IO.Exception")
gHC_ST = mkBaseModule (fsLit "GHC.ST")
gHC_ARR = mkBaseModule (fsLit "GHC.Arr")
gHC_ARR = mkBaseModule (fsLit "GHC.Arr.Imp")
gHC_STABLE = mkBaseModule (fsLit "GHC.Stable")
gHC_PTR = mkBaseModule (fsLit "GHC.Ptr")
gHC_PTR = mkBaseModule (fsLit "GHC.Ptr.Imp")
gHC_ERR = mkBaseModule (fsLit "GHC.Err")
gHC_REAL = mkBaseModule (fsLit "GHC.Real")
gHC_FLOAT = mkBaseModule (fsLit "GHC.Float")
......
......@@ -81,7 +81,8 @@ import System.IO.Error ( mkIOError, eofErrorType )
import GHC.Real ( Ratio(..) )
import GHC.Exts
import GHC.Word ( Word8(..) )
import GHC.IO ( IO(..) )
import GhcIO ( IO(..) )
type BinArray = ForeignPtr Word8
......
......@@ -32,7 +32,11 @@ module Encoding (
import Foreign
import Data.Char
import Numeric
#if __GLASGOW_HASKELL__ >= 701
import GHC.Ptr.Unsafe ( Ptr(..) )
#else
import GHC.Ptr ( Ptr(..) )
#endif
import GHC.Base
-- -----------------------------------------------------------------------------
......
......@@ -22,9 +22,10 @@ import System.IO.Unsafe
import GHC.Exts
import GHC.Word
import GHC.IO (IO(..), unsafeDupableInterleaveIO)
import GHC.Base (unsafeChr)
import GhcIO (IO(..), unsafeDupableInterleaveIO)
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
inlinePerformIO :: IO a -> a
......
......@@ -26,7 +26,11 @@ module FastMutInt(
#endif
import GHC.Base
import GHC.Ptr
#if __GLASGOW_HASKELL__ >= 701
import GHC.Ptr.Unsafe ( Ptr(..) )
#else
import GHC.Ptr ( Ptr(..) )
#endif
#else /* ! __GLASGOW_HASKELL__ */
......
......@@ -106,7 +106,7 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
import Data.Maybe ( isJust )
import Data.Char ( ord )
import GHC.IO ( IO(..) )
import GhcIO ( IO(..) )
import GHC.Ptr ( Ptr(..) )
#if defined(__GLASGOW_HASKELL__)
......
-- | A simple version compatability wrapper around GHC.IO.
-- This module exports both the safe and Unsafe version of GHC.IO
-- after that SafeHaskell change over occured.
module GhcIO (
#if __GLASGOW_HASKELL__ >= 701
module GHC.IO.Unsafe,
#endif
module GHC.IO
) where
#if __GLASGOW_HASKELL__ >= 701
import GHC.IO.Unsafe
#endif
import GHC.IO
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