Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
c84ddf85
Commit
c84ddf85
authored
May 19, 2011
by
dterei
Browse files
SafeHaskell: Update to work with safe base
parent
e0eb7e7d
Changes
12
Hide whitespace changes
Inline
Side-by-side
compiler/basicTypes/UniqSupply.lhs
View file @
c84ddf85
...
...
@@ -29,9 +29,10 @@ module UniqSupply (
import Unique
import FastTypes
import GhcIO (unsafeDupableInterleaveIO)
import MonadUtils
import Control.Monad
import GHC.IO (unsafeDupableInterleaveIO)
\end{code}
...
...
compiler/ghc.cabal.in
View file @
c84ddf85
...
...
@@ -435,6 +435,7 @@ Library
FastTypes
Fingerprint
FiniteMap
GhcIO
GraphBase
GraphColor
GraphOps
...
...
compiler/ghci/ByteCodeLink.lhs
View file @
c84ddf85
...
...
@@ -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}
...
...
compiler/ghci/RtClosureInspect.hs
View file @
c84ddf85
...
...
@@ -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
G
HC.
IO
(
IO
(
..
)
)
import
G
hc
IO
(
IO
(
..
)
)
import
StaticFlags
(
opt_PprStyle_Debug
)
import
Control.Monad
...
...
compiler/main/BreakArray.hs
View file @
c84ddf85
...
...
@@ -26,7 +26,7 @@ module BreakArray
)
where
#
ifdef
GHCI
import
GHC.Exts
import
G
HC.
IO
(
IO
(
..
)
)
import
G
hc
IO
(
IO
(
..
)
)
import
Constants
data
BreakArray
=
BA
(
MutableByteArray
#
RealWorld
)
...
...
compiler/prelude/PrelNames.lhs
View file @
c84ddf85
...
...
@@ -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")
...
...
compiler/utils/Binary.hs
View file @
c84ddf85
...
...
@@ -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
...
...
compiler/utils/Encoding.hs
View file @
c84ddf85
...
...
@@ -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
-- -----------------------------------------------------------------------------
...
...
compiler/utils/FastFunctions.lhs
View file @
c84ddf85
...
...
@@ -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
...
...
compiler/utils/FastMutInt.lhs
View file @
c84ddf85
...
...
@@ -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__ */
...
...
compiler/utils/FastString.lhs
View file @
c84ddf85
...
...
@@ -106,7 +106,7 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
import Data.Maybe ( isJust )
import Data.Char ( ord )
import G
HC.
IO ( IO(..) )
import G
hc
IO ( IO(..) )
import GHC.Ptr ( Ptr(..) )
#if defined(__GLASGOW_HASKELL__)
...
...
compiler/utils/GhcIO.hs
0 → 100644
View file @
c84ddf85
-- | 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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment