{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
module Foreign.Prim
(
unsafeThawByteArray#
, mutableByteArrayContents#
, unsafeThawArrayArray#
, unInt#
, unWord#
, module Foreign.Prim.C
, module Foreign.Prim.Cmm
, module Foreign.C.Types
, module System.Posix.Types
, module GHC.Exts
#if __GLASGOW_HASKELL__ < 804
, module GHC.Prim
#endif
, module GHC.Int
, module GHC.Word
) where
import Foreign.Prim.C
import Foreign.Prim.Cmm
import Foreign.C.Types
import System.Posix.Types
import GHC.Exts
import GHC.Int
import GHC.Word
#if __GLASGOW_HASKELL__ < 804
import GHC.Prim
( addCFinalizerToWeak#
, deRefWeak#
, finalizeWeak#
, mkWeak#
, mkWeakNoFinalizer#
)
#endif
unsafeThawByteArray# :: ByteArray# -> State# s -> (# State# s, MutableByteArray# s #)
unsafeThawByteArray# ba# s = (# s, unsafeCoerce# ba# #)
{-# INLINE unsafeThawByteArray# #-}
mutableByteArrayContents# :: MutableByteArray# s -> Addr#
mutableByteArrayContents# mba# = byteArrayContents# (unsafeCoerce# mba#)
{-# INLINE mutableByteArrayContents# #-}
unsafeThawArrayArray# :: ArrayArray# -> State# s -> (# State# s, MutableArrayArray# s #)
unsafeThawArrayArray# ba# s = (# s, unsafeCoerce# ba# #)
{-# INLINE unsafeThawArrayArray# #-}
unInt# :: Int -> Int#
unInt# (I# i#) = i#
{-# INLINE unInt# #-}
unWord# :: Word -> Word#
unWord# (W# w#) = w#
{-# INLINE unWord# #-}