-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | lifted IO operations from the base library
--   
--   lifted-base exports IO operations from the base library
--   lifted to any instance of MonadBase or MonadBaseControl.
--   
--   Note that not all modules from base are converted yet. If you
--   need a lifted version of a function from base, just ask me to
--   add it or send me a patch.
--   
--   The package includes a copy of the monad-peel testsuite
--   written by Anders Kaseorg The tests can be performed using cabal
--   test.
@package lifted-base
@version 0.2.3.12

-- | This is a wrapped version of Control.Concurrent.Chan with types
--   generalised from IO to all monads in MonadBase.
--   
--   unGetChan and isEmptyChan are deprecated in
--   base, therefore they are not included here. Use TVar
--   instead.
module Control.Concurrent.Chan.Lifted

-- | Chan is an abstract type representing an unbounded FIFO
--   channel.
data Chan a

-- | Generalized version of newChan.
newChan :: MonadBase IO m => m (Chan a)

-- | Generalized version of writeChan.
writeChan :: MonadBase IO m => Chan a -> a -> m ()

-- | Generalized version of readChan.
readChan :: MonadBase IO m => Chan a -> m a

-- | Generalized version of dupChan.
dupChan :: MonadBase IO m => Chan a -> m (Chan a)

-- | Generalized version of getChanContents.
getChanContents :: MonadBase IO m => Chan a -> m [a]

-- | Generalized version of writeList2Chan.
writeList2Chan :: MonadBase IO m => Chan a -> [a] -> m ()

-- | This is a wrapped version of Control.Concurrent.MVar with types
--   generalized from IO to all monads in either MonadBase or
--   MonadBaseControl.
module Control.Concurrent.MVar.Lifted

-- | An MVar (pronounced "em-var") is a synchronising variable, used
--   for communication between concurrent threads. It can be thought of as
--   a box, which may be empty or full.
data MVar a

-- | Generalized version of newEmptyMVar.
newEmptyMVar :: MonadBase IO m => m (MVar a)

-- | Generalized version of newMVar.
newMVar :: MonadBase IO m => a -> m (MVar a)

-- | Generalized version of takeMVar.
takeMVar :: MonadBase IO m => MVar a -> m a

-- | Generalized version of putMVar.
putMVar :: MonadBase IO m => MVar a -> a -> m ()

-- | Generalized version of readMVar.
readMVar :: MonadBase IO m => MVar a -> m a

-- | Generalized version of swapMVar.
swapMVar :: MonadBase IO m => MVar a -> a -> m a

-- | Generalized version of tryTakeMVar.
tryTakeMVar :: MonadBase IO m => MVar a -> m (Maybe a)

-- | Generalized version of tryPutMVar.
tryPutMVar :: MonadBase IO m => MVar a -> a -> m Bool

-- | Generalized version of isEmptyMVar.
isEmptyMVar :: MonadBase IO m => MVar a -> m Bool

-- | Generalized version of withMVar.
withMVar :: MonadBaseControl IO m => MVar a -> (a -> m b) -> m b

-- | Generalized version of modifyMVar_.
modifyMVar_ :: MonadBaseControl IO m => MVar a -> (a -> m a) -> m ()

-- | Generalized version of modifyMVar.
modifyMVar :: MonadBaseControl IO m => MVar a -> (a -> m (a, b)) -> m b

-- | Generalized version of modifyMVarMasked_.
modifyMVarMasked_ :: MonadBaseControl IO m => MVar a -> (a -> m a) -> m ()

-- | Generalized version of modifyMVarMasked.
modifyMVarMasked :: MonadBaseControl IO m => MVar a -> (a -> m (a, b)) -> m b

-- | Generalized version of mkWeakMVar.
--   
--   Note any monadic side effects in m of the "finalizer"
--   computation are discarded.
mkWeakMVar :: MonadBaseControl IO m => MVar a -> m () -> m (Weak (MVar a))

-- | Generalized version of withMVarMasked.
withMVarMasked :: MonadBaseControl IO m => MVar a -> (a -> m b) -> m b

-- | Generalized version of tryReadMVar.
tryReadMVar :: MonadBase IO m => MVar a -> m (Maybe a)

-- | This is a wrapped version of Control.Concurrent.QSem with types
--   generalised from IO to all monads in MonadBase.
module Control.Concurrent.QSem.Lifted

-- | QSem is a quantity semaphore in which the resource is acquired
--   and released in units of one. It provides guaranteed FIFO ordering for
--   satisfying blocked waitQSem calls.
--   
--   The pattern
--   
--   
--   bracket_ waitQSem signalQSem (...)
--   
--   
--   is safe; it never loses a unit of the resource.
data QSem

-- | Generalized version of newQSem.
newQSem :: MonadBase IO m => Int -> m QSem

-- | Generalized version of waitQSem.
waitQSem :: MonadBase IO m => QSem -> m ()

-- | Generalized version of signalQSem.
signalQSem :: MonadBase IO m => QSem -> m ()

-- | This is a wrapped version of Control.Concurrent.QSemN with
--   types generalised from IO to all monads in MonadBase.
module Control.Concurrent.QSemN.Lifted

-- | QSemN is a quantity semaphore in which the resource is acquired
--   and released in units of one. It provides guaranteed FIFO ordering for
--   satisfying blocked waitQSemN calls.
--   
--   The pattern
--   
--   
--   bracket_ (waitQSemN n) (signalQSemN n) (...)
--   
--   
--   is safe; it never loses any of the resource.
data QSemN

-- | Generalized version of newQSemN.
newQSemN :: MonadBase IO m => Int -> m QSemN

-- | Generalized version of waitQSemN.
waitQSemN :: MonadBase IO m => QSemN -> Int -> m ()

-- | Generalized version of signalQSemN.
signalQSemN :: MonadBase IO m => QSemN -> Int -> m ()

-- | This is a wrapped version of Control.Exception with types
--   generalized from IO to all monads in either MonadBase or
--   MonadBaseControl.
module Control.Exception.Lifted

-- | If the first argument evaluates to True, then the result is the
--   second argument. Otherwise an AssertionFailed exception is
--   raised, containing a String with the source file and line
--   number of the call to assert.
--   
--   Assertions can normally be turned on or off with a compiler flag (for
--   GHC, assertions are normally on unless optimisation is turned on with
--   -O or the -fignore-asserts option is given). When
--   assertions are turned off, the first argument to assert is
--   ignored, and the second argument is returned as the result.
assert :: () => Bool -> a -> a

-- | This function maps one exception into another as proposed in the paper
--   "A semantics for imprecise exceptions".
mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a

-- | A pattern match failed. The String gives information about
--   the source location of the pattern.
newtype PatternMatchFail
PatternMatchFail :: String -> PatternMatchFail

-- | A record selector was applied to a constructor without the appropriate
--   field. This can only happen with a datatype with multiple
--   constructors, where some fields are in one constructor but not
--   another. The String gives information about the source
--   location of the record selector.
newtype RecSelError
RecSelError :: String -> RecSelError

-- | An uninitialised record field was used. The String gives
--   information about the source location where the record was
--   constructed.
newtype RecConError
RecConError :: String -> RecConError

-- | A record update was performed on a constructor without the appropriate
--   field. This can only happen with a datatype with multiple
--   constructors, where some fields are in one constructor but not
--   another. The String gives information about the source
--   location of the record update.
newtype RecUpdError
RecUpdError :: String -> RecUpdError

-- | A class method without a definition (neither a default definition, nor
--   a definition in the appropriate instance) was called. The
--   String gives information about which method it was.
newtype NoMethodError
NoMethodError :: String -> NoMethodError

-- | An expression that didn't typecheck during compile time was called.
--   This is only possible with -fdefer-type-errors. The String
--   gives details about the failed type check.
newtype TypeError
TypeError :: String -> TypeError

-- | Thrown when the runtime system detects that the computation is
--   guaranteed not to terminate. Note that there is no guarantee that the
--   runtime system will notice whether any given computation is guaranteed
--   to terminate or not.
data NonTermination
NonTermination :: NonTermination

-- | Thrown when the program attempts to call atomically, from the
--   stm package, inside another call to atomically.
data NestedAtomically
NestedAtomically :: NestedAtomically

asyncExceptionFromException :: Exception e => SomeException -> Maybe e

asyncExceptionToException :: Exception e => e -> SomeException

-- | The thread is blocked on an MVar, but there are no other
--   references to the MVar so it can't ever continue.
data BlockedIndefinitelyOnMVar
BlockedIndefinitelyOnMVar :: BlockedIndefinitelyOnMVar

-- | The thread is waiting to retry an STM transaction, but there are no
--   other references to any TVars involved, so it can't ever
--   continue.
data BlockedIndefinitelyOnSTM
BlockedIndefinitelyOnSTM :: BlockedIndefinitelyOnSTM

-- | There are no runnable threads, so the program is deadlocked. The
--   Deadlock exception is raised in the main thread only.
data Deadlock
Deadlock :: Deadlock

-- | This thread has exceeded its allocation limit. See
--   setAllocationCounter and enableAllocationLimit.
data AllocationLimitExceeded
AllocationLimitExceeded :: AllocationLimitExceeded

-- | Compaction found an object that cannot be compacted. Functions cannot
--   be compacted, nor can mutable objects or pinned objects. See
--   compact.
newtype CompactionFailed
CompactionFailed :: String -> CompactionFailed

-- | assert was applied to False.
newtype AssertionFailed
AssertionFailed :: String -> AssertionFailed

-- | Superclass for asynchronous exceptions.
data SomeAsyncException
[SomeAsyncException] :: forall e. Exception e => e -> SomeAsyncException

-- | Asynchronous exceptions.
data AsyncException

-- | The current thread's stack exceeded its limit. Since an exception has
--   been raised, the thread's stack will certainly be below its limit
--   again, but the programmer should take remedial action immediately.
StackOverflow :: AsyncException

-- | The program's heap is reaching its limit, and the program should take
--   action to reduce the amount of live data it has. Notes:
--   
--   
--   
- It is undefined which thread receives this exception. GHC
--   currently throws this to the same thread that receives
--   UserInterrupt, but this may change in the future.
--   
- The GHC RTS currently can only recover from heap overflow if it
--   detects that an explicit memory limit (set via RTS flags). has been
--   exceeded. Currently, failure to allocate memory from the operating
--   system results in immediate termination of the program.
--   
HeapOverflow :: AsyncException

-- | This exception is raised by another thread calling killThread,
--   or by the system if it needs to terminate the thread for some reason.
ThreadKilled :: AsyncException

-- | This exception is raised by default in the main thread of the program
--   when the user requests to terminate the program via the usual
--   mechanism(s) (e.g. Control-C in the console).
UserInterrupt :: AsyncException

-- | Exceptions generated by array operations
data ArrayException

-- | An attempt was made to index an array outside its declared bounds.
IndexOutOfBounds :: String -> ArrayException

-- | An attempt was made to evaluate an element of an array that had not
--   been initialized.
UndefinedElement :: String -> ArrayException

-- | Allow asynchronous exceptions to be raised even inside mask,
--   making the operation interruptible (see the discussion of
--   "Interruptible operations" in Exception).
--   
--   When called outside mask, or inside uninterruptibleMask,
--   this function has no effect.
interruptible :: () => IO a -> IO a

-- | Describes the behaviour of a thread when an asynchronous exception is
--   received.
data MaskingState

-- | asynchronous exceptions are unmasked (the normal state)
Unmasked :: MaskingState

-- | the state during mask: asynchronous exceptions are masked, but
--   blocking operations may still be interrupted
MaskedInterruptible :: MaskingState

-- | the state during uninterruptibleMask: asynchronous exceptions
--   are masked, and blocking operations may not be interrupted
MaskedUninterruptible :: MaskingState

-- | Exceptions that occur in the IO monad. An
--   IOException records a more specific error type, a descriptive
--   string and maybe the handle that was used when the error was flagged.
data IOException

-- | Throw an exception. Exceptions may be thrown from purely functional
--   code, but may only be caught within the IO monad.
throw :: Exception e => e -> a

-- | This is thrown when the user calls error. The first
--   String is the argument given to error, second
--   String is the location.
data ErrorCall
ErrorCallWithLocation :: String -> String -> ErrorCall
pattern ErrorCall :: () => () => String -> ErrorCall

-- | Any type that you wish to throw or catch as an exception must be an
--   instance of the Exception class. The simplest case is a new
--   exception type directly below the root:
--   
--   
--   data MyException = ThisException | ThatException
--       deriving Show
--   
--   instance Exception MyException
--   
--   
--   The default method definitions in the Exception class do what
--   we need in this case. You can now throw and catch
--   ThisException and ThatException as exceptions:
--   
--   
--   *Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
--   Caught ThisException
--   
--   
--   In more complicated examples, you may wish to define a whole hierarchy
--   of exceptions:
--   
--   
--   ---------------------------------------------------------------------
--   -- Make the root exception type for all the exceptions in a compiler
--   
--   data SomeCompilerException = forall e . Exception e => SomeCompilerException e
--   
--   instance Show SomeCompilerException where
--       show (SomeCompilerException e) = show e
--   
--   instance Exception SomeCompilerException
--   
--   compilerExceptionToException :: Exception e => e -> SomeException
--   compilerExceptionToException = toException . SomeCompilerException
--   
--   compilerExceptionFromException :: Exception e => SomeException -> Maybe e
--   compilerExceptionFromException x = do
--       SomeCompilerException a <- fromException x
--       cast a
--   
--   ---------------------------------------------------------------------
--   -- Make a subhierarchy for exceptions in the frontend of the compiler
--   
--   data SomeFrontendException = forall e . Exception e => SomeFrontendException e
--   
--   instance Show SomeFrontendException where
--       show (SomeFrontendException e) = show e
--   
--   instance Exception SomeFrontendException where
--       toException = compilerExceptionToException
--       fromException = compilerExceptionFromException
--   
--   frontendExceptionToException :: Exception e => e -> SomeException
--   frontendExceptionToException = toException . SomeFrontendException
--   
--   frontendExceptionFromException :: Exception e => SomeException -> Maybe e
--   frontendExceptionFromException x = do
--       SomeFrontendException a <- fromException x
--       cast a
--   
--   ---------------------------------------------------------------------
--   -- Make an exception type for a particular frontend compiler exception
--   
--   data MismatchedParentheses = MismatchedParentheses
--       deriving Show
--   
--   instance Exception MismatchedParentheses where
--       toException   = frontendExceptionToException
--       fromException = frontendExceptionFromException
--   
--   
--   We can now catch a MismatchedParentheses exception as
--   MismatchedParentheses, SomeFrontendException or
--   SomeCompilerException, but not other types, e.g.
--   IOException:
--   
--   
--   *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
--   Caught MismatchedParentheses
--   *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
--   Caught MismatchedParentheses
--   *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
--   Caught MismatchedParentheses
--   *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
--   *** Exception: MismatchedParentheses
--   
class (Typeable e, Show e) => Exception e
toException :: Exception e => e -> SomeException
fromException :: Exception e => SomeException -> Maybe e

-- | Render this exception value in a human-friendly manner.
--   
--   Default implementation: show.
displayException :: Exception e => e -> String

-- | Arithmetic exceptions.
data ArithException
Overflow :: ArithException
Underflow :: ArithException
LossOfPrecision :: ArithException
DivideByZero :: ArithException
Denormal :: ArithException

RatioZeroDenominator :: ArithException

-- | The SomeException type is the root of the exception type
--   hierarchy. When an exception of type e is thrown, behind the
--   scenes it is encapsulated in a SomeException.
data SomeException
[SomeException] :: forall e. Exception e => e -> SomeException

-- | Generalized version of throwIO.
throwIO :: (MonadBase IO m, Exception e) => e -> m a

-- | Generalized version of ioError.
ioError :: MonadBase IO m => IOError -> m a

-- | Generalized version of throwTo.
throwTo :: (MonadBase IO m, Exception e) => ThreadId -> e -> m ()

-- | Generalized version of catch.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
catch :: (MonadBaseControl IO m, Exception e) => m a -> (e -> m a) -> m a

-- | Generalized version of catches.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
catches :: MonadBaseControl IO m => m a -> [Handler m a] -> m a

-- | Generalized version of Handler.
data Handler m a
Handler :: (e -> m a) -> Handler m a

-- | Generalized version of catchJust.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
catchJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a

-- | Generalized version of handle.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
handle :: (MonadBaseControl IO m, Exception e) => (e -> m a) -> m a -> m a

-- | Generalized version of handleJust.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
handleJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a

-- | Generalized version of try.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
try :: (MonadBaseControl IO m, Exception e) => m a -> m (Either e a)

-- | Generalized version of tryJust.
--   
--   Note, when the given computation throws an exception any monadic side
--   effects in m will be discarded.
tryJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)

-- | Generalized version of evaluate.
evaluate :: MonadBase IO m => a -> m a

-- | Generalized version of mask.
mask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b

-- | Generalized version of mask_.
mask_ :: MonadBaseControl IO m => m a -> m a

-- | Generalized version of uninterruptibleMask.
uninterruptibleMask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b

-- | Generalized version of uninterruptibleMask_.
uninterruptibleMask_ :: MonadBaseControl IO m => m a -> m a

-- | Generalized version of getMaskingState.
getMaskingState :: MonadBase IO m => m MaskingState

-- | Generalized version of allowInterrupt.
allowInterrupt :: MonadBase IO m => m ()

-- | Generalized version of bracket.
--   
--   Note:
--   
--   
--   
- When the "acquire" or "release" computations throw exceptions any
--   monadic side effects in m will be discarded.
--   
- When the "in-between" computation throws an exception any monadic
--   side effects in m produced by that computation will be
--   discarded but the side effects of the "acquire" or "release"
--   computations will be retained.
--   
- Also, any monadic side effects in m of the "release"
--   computation will be discarded; it is run only for its side effects in
--   IO.
--   
--   
--   Note that when your acquire and release computations
--   are of type IO it will be more efficient to write:
--   
--   
--   liftBaseOp (bracket acquire release)
--   
bracket :: MonadBaseControl IO m => m a -> (a -> m b) -> (a -> m c) -> m c

-- | Generalized version of bracket_.
--   
--   Note any monadic side effects in m of both the
--   "acquire" and "release" computations will be discarded. To keep the
--   monadic side effects of the "acquire" computation, use bracket
--   with constant functions instead.
--   
--   Note that when your acquire and release computations
--   are of type IO it will be more efficient to write:
--   
--   
--   liftBaseOp_ (bracket_ acquire release)
--   
bracket_ :: MonadBaseControl IO m => m a -> m b -> m c -> m c

-- | Generalized version of bracketOnError.
--   
--   Note:
--   
--   
--   
- When the "acquire" or "release" computations throw exceptions any
--   monadic side effects in m will be discarded.
--   
- When the "in-between" computation throws an exception any monadic
--   side effects in m produced by that computation will be
--   discarded but the side effects of the "acquire" computation will be
--   retained.
--   
- Also, any monadic side effects in m of the "release"
--   computation will be discarded; it is run only for its side effects in
--   IO.
--   
--   
--   Note that when your acquire and release computations
--   are of type IO it will be more efficient to write:
--   
--   
--   liftBaseOp (bracketOnError acquire release)
--   
bracketOnError :: MonadBaseControl IO m => m a -> (a -> m b) -> (a -> m c) -> m c

-- | Generalized version of finally.
--   
--   Note, any monadic side effects in m of the "afterward"
--   computation will be discarded.
finally :: MonadBaseControl IO m => m a -> m b -> m a

-- | Generalized version of onException.
--   
--   Note, any monadic side effects in m of the "afterward"
--   computation will be discarded.
onException :: MonadBaseControl IO m => m a -> m b -> m a

-- | This is a wrapped version of Control.Concurrent with types
--   generalized from IO to all monads in either MonadBase or
--   MonadBaseControl.
module Control.Concurrent.Lifted

-- | A ThreadId is an abstract type representing a handle to a
--   thread. ThreadId is an instance of Eq, Ord and
--   Show, where the Ord instance implements an arbitrary
--   total ordering over ThreadIds. The Show instance lets
--   you convert an arbitrary-valued ThreadId to string form;
--   showing a ThreadId value is occasionally useful when debugging
--   or diagnosing the behaviour of a concurrent program.
--   
--   Note: in GHC, if you have a ThreadId, you essentially
--   have a pointer to the thread itself. This means the thread itself
--   can't be garbage collected until you drop the ThreadId. This
--   misfeature will hopefully be corrected at a later date.
data ThreadId

-- | Generalized version of myThreadId.
myThreadId :: MonadBase IO m => m ThreadId

-- | Generalized version of forkIO.
--   
--   Note that, while the forked computation m () has access to
--   the captured state, all its side-effects in m are discarded.
--   It is run only for its side-effects in IO.
fork :: MonadBaseControl IO m => m () -> m ThreadId

-- | Generalized version of forkIOWithUnmask.
--   
--   Note that, while the forked computation m () has access to
--   the captured state, all its side-effects in m are discarded.
--   It is run only for its side-effects in IO.
forkWithUnmask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m ()) -> m ThreadId

-- | Generalized version of forkFinally.
--   
--   Note that in forkFinally action and_then, while the forked
--   action and the and_then function have access to the
--   captured state, all their side-effects in m are discarded.
--   They're run only for their side-effects in IO.
forkFinally :: MonadBaseControl IO m => m a -> (Either SomeException a -> m ()) -> m ThreadId

-- | Generalized version of killThread.
killThread :: MonadBase IO m => ThreadId -> m ()

-- | Generalized version of throwTo.
throwTo :: (MonadBase IO m, Exception e) => ThreadId -> e -> m ()

-- | Generalized version of forkOn.
--   
--   Note that, while the forked computation m () has access to
--   the captured state, all its side-effects in m are discarded.
--   It is run only for its side-effects in IO.
forkOn :: MonadBaseControl IO m => Int -> m () -> m ThreadId

-- | Generalized version of forkOnWithUnmask.
--   
--   Note that, while the forked computation m () has access to
--   the captured state, all its side-effects in m are discarded.
--   It is run only for its side-effects in IO.
forkOnWithUnmask :: MonadBaseControl IO m => Int -> ((forall a. m a -> m a) -> m ()) -> m ThreadId

-- | Generalized version of getNumCapabilities.
getNumCapabilities :: MonadBase IO m => m Int

-- | Generalized version of setNumCapabilities.
setNumCapabilities :: MonadBase IO m => Int -> m ()

-- | Generalized version of threadCapability.
threadCapability :: MonadBase IO m => ThreadId -> m (Int, Bool)

-- | Generalized version of yield.
yield :: MonadBase IO m => m ()

-- | Generalized version of threadDelay.
threadDelay :: MonadBase IO m => Int -> m ()

-- | Generalized version of threadWaitRead.
threadWaitRead :: MonadBase IO m => Fd -> m ()

-- | Generalized version of threadWaitWrite.
threadWaitWrite :: MonadBase IO m => Fd -> m ()

-- | True if bound threads are supported. If
--   rtsSupportsBoundThreads is False,
--   isCurrentThreadBound will always return False and both
--   forkOS and runInBoundThread will fail.
rtsSupportsBoundThreads :: Bool

-- | Generalized version of forkOS.
--   
--   Note that, while the forked computation m () has access to
--   the captured state, all its side-effects in m are discarded.
--   It is run only for its side-effects in IO.
forkOS :: MonadBaseControl IO m => m () -> m ThreadId

-- | Generalized version of isCurrentThreadBound.
isCurrentThreadBound :: MonadBase IO m => m Bool

-- | Generalized version of runInBoundThread.
runInBoundThread :: MonadBaseControl IO m => m a -> m a

-- | Generalized version of runInUnboundThread.
runInUnboundThread :: MonadBaseControl IO m => m a -> m a

-- | Generalized versio of mkWeakThreadId.
mkWeakThreadId :: MonadBase IO m => ThreadId -> m (Weak ThreadId)

-- | This is a wrapped version of Data.IORef with types generalised
--   from IO to all monads in MonadBase.
module Data.IORef.Lifted

-- | A mutable variable in the IO monad
data IORef a

-- | Generalized version of newIORef.
newIORef :: MonadBase IO m => a -> m (IORef a)

-- | Generalized version of readIORef.
readIORef :: MonadBase IO m => IORef a -> m a

-- | Generalized version of writeIORef.
writeIORef :: MonadBase IO m => IORef a -> a -> m ()

-- | Generalized version of modifyIORef.
modifyIORef :: MonadBase IO m => IORef a -> (a -> a) -> m ()

-- | Generalized version of modifyIORef'.
modifyIORef' :: MonadBase IO m => IORef a -> (a -> a) -> m ()

-- | Generalized version of atomicModifyIORef.
atomicModifyIORef :: MonadBase IO m => IORef a -> (a -> (a, b)) -> m b

-- | Generalized version of atomicModifyIORef'.
atomicModifyIORef' :: MonadBase IO m => IORef a -> (a -> (a, b)) -> m b

-- | Generalized version of atomicWriteIORef.
atomicWriteIORef :: MonadBase IO m => IORef a -> a -> m ()

-- | Generalized version of mkWeakIORef.
--   
--   Note any monadic side effects in m of the "finalizer"
--   computation are discarded.
mkWeakIORef :: MonadBaseControl IO m => IORef a -> m () -> m (Weak (IORef a))

-- | This is a wrapped version of Foreign.Marshal.Utils with types
--   generalized from IO to all monads in either MonadBase
--   or MonadBaseControl.
module Foreign.Marshal.Utils.Lifted

-- | Generalized version of with.
--   
--   Note, when the given function throws an exception any monadic side
--   effects in m will be discarded.
with :: (MonadBaseControl IO m, Storable a) => a -> (Ptr a -> m b) -> m b

-- | Attach a timeout event to monadic computations which are instances of
--   MonadBaseControl.
module System.Timeout.Lifted

-- | Generalized version of timeout.
--   
--   Note that when the given computation times out any side effects of
--   m are discarded. When the computation completes within the
--   given time the side-effects are restored on return.
timeout :: MonadBaseControl IO m => Int -> m a -> m (Maybe a)
