| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Effectful.Internal.Utils
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 -> Word64 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.
Unique
A unique with no possibility for CAS contention.
Credits for this go to Edward Kmett.
CallStack
thawCallStack :: CallStack -> CallStack Source #
Remove exactly one layer of freezing, i.e. the one added by send and
friends via withFrozenCallStack. Freezes applied by client code need to
stay intact, so this must not recurse.
Array capacity
growCapacity :: Int -> Int Source #
Grow capacity of an array.