effectful-core-1.2.0.0: An easy to use, performant extensible effects library.
Safe HaskellNone
LanguageHaskell2010

Effectful.Internal.Utils

Synopsis

Documentation

weakThreadId :: ThreadId -> Int Source #

Get an id of a thread that doesn't prevent its garbage collection.

eqThreadId :: ThreadId -> ThreadId -> Bool Source #

Eq instance for ThreadId is broken in GHC < 9, see https://gitlab.haskell.org/ghc/ghc/-/issues/16761 for more info.

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.

toAny :: a -> Any Source #