Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- inlineBracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
- weakThreadId :: ThreadId -> Int
- eqThreadId :: ThreadId -> ThreadId -> Bool
- type family Any :: k where ...
- toAny :: a -> Any
- fromAny :: Any -> a
- data IORef' a
- newIORef' :: a -> IO (IORef' a)
- readIORef' :: IORef' a -> IO a
- writeIORef' :: IORef' a -> a -> IO ()
- data MVar' a
- toMVar' :: MVar a -> IO (MVar' a)
- newMVar' :: a -> IO (MVar' a)
- readMVar' :: MVar' a -> IO a
- modifyMVar' :: MVar' a -> (a -> IO (a, r)) -> IO r
- modifyMVar_' :: MVar' a -> (a -> IO a) -> IO ()
Documentation
inlineBracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c Source #
Version of bracket with an INLINE pragma to work around https://gitlab.haskell.org/ghc/ghc/-/issues/22824.
Utils for ThreadId
weakThreadId :: ThreadId -> Int Source #
Get an id of a thread that doesn't prevent its garbage collection.
Utils for Any
type family Any :: k where ... #
The type constructor Any
is type to which you can unsafely coerce any
lifted type, and back. More concretely, for a lifted type t
and
value x :: t
, -- unsafeCoerce (unsafeCoerce x :: Any) :: t
is equivalent
to x
.
Strict IORef
A strict variant of IORef
.
readIORef' :: IORef' a -> IO a Source #
writeIORef' :: IORef' a -> a -> IO () Source #
Strict MVar
A strict variant of MVar
.