    module System.Unsafe where

    -- taken from share/doc/ghc/html/libraries/base-4.5.1.0/doc-index-U.html
    import System.IO.Unsafe (unsafePerformIO, unsafeInterleaveIO, )
    import Control.Monad.ST.Unsafe (unsafeInterleaveST, unsafeIOToST, unsafeSTToIO, )
    import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr, )
    import Unsafe.Coerce (unsafeCoerce, )

    import Control.Monad.ST (ST, )
    import Foreign.ForeignPtr (ForeignPtr, )
    import Foreign.Ptr (Ptr, )

    performIO :: IO a -> a
    performIO :: IO a -> a
    performIO = IO a -> a
    forall a. IO a -> a
    unsafePerformIO

    interleaveIO :: IO a -> IO a
    interleaveIO :: IO a -> IO a
    interleaveIO = IO a -> IO a
    forall a. IO a -> IO a
    unsafeInterleaveIO

    interleaveST :: ST s a -> ST s a
    interleaveST :: ST s a -> ST s a
    interleaveST = ST s a -> ST s a
    forall s a. ST s a -> ST s a
    unsafeInterleaveST

    ioToST :: IO a -> ST s a
    ioToST :: IO a -> ST s a
    ioToST = IO a -> ST s a
    forall a s. IO a -> ST s a
    unsafeIOToST

    stToIO :: ST s a -> IO a
    stToIO :: ST s a -> IO a
    stToIO = ST s a -> IO a
    forall s a. ST s a -> IO a
    unsafeSTToIO

    foreignPtrToPtr :: ForeignPtr a -> Ptr a
    foreignPtrToPtr :: ForeignPtr a -> Ptr a
    foreignPtrToPtr = ForeignPtr a -> Ptr a
    forall a. ForeignPtr a -> Ptr a
    unsafeForeignPtrToPtr

    coerce :: a -> b
    coerce :: a -> b
    coerce = a -> b
    forall a b. a -> b
    unsafeCoerce