grisette-0.11.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellNone
LanguageHaskell2010

Grisette.Internal.SymPrim.Prim.Internal.Utils

Description

 
Synopsis

Documentation

pattern Dyn :: (Typeable a, Typeable b) => a -> b Source #

Pattern synonym for dynamic type casting.

cmpHetero :: (Typeable a, Typeable b) => (a -> a -> Bool) -> a -> b -> Bool Source #

Compare two values of different types.

eqHetero :: (Typeable a, Typeable b, Eq a) => a -> b -> Bool Source #

Compare two values of different types for equality.

cmpHeteroRep :: TypeRep a -> TypeRep b -> (a -> a -> Bool) -> a -> b -> Bool Source #

Compare two values of different types, resolve the type equality using the type representation.

eqHeteroRep :: Eq a => TypeRep a -> TypeRep b -> a -> b -> Bool Source #

Compare two values of different types for equality, resolve the type equality using the type representation.

eqTypeRepBool :: forall ka kb (a :: ka) (b :: kb). TypeRep a -> TypeRep b -> Bool Source #

Compare two type representations for equality.

type WeakThreadId = Word64 Source #

A weak identifier to a thread id that doesn't prevent its garbage collection.

weakThreadId :: ThreadId -> Word64 Source #

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

type WeakThreadIdRef = Weak ThreadId Source #

A weak reference to a thread id that doesn't prevent its garbage collection.

myWeakThreadId :: IO WeakThreadId Source #

Get a weak identifier to the current thread id.

weakThreadRefAlive :: WeakThreadIdRef -> IO Bool Source #

Check if a weak reference to a thread id is still alive.

mkWeakThreadIdRefWithFinalizer :: ThreadId -> IO () -> IO (Weak ThreadId) Source #

Create a weak reference to a thread id with a finalizer.

addStableNameFinalizer :: StableName a -> IO () -> IO () Source #

Add a finalizer to a stable name.

addThreadIdFinalizer :: ThreadId -> IO () -> IO () Source #

Add a finalizer to a thread id.

mkWeakStableNameRefWithFinalizer :: StableName a -> IO () -> IO (Weak (StableName a)) Source #

Create a weak reference to a stable name with a finalizer.

data SomeStableName where Source #

A type-erased stable name.

Constructors

SomeStableName :: forall a. StableName a -> SomeStableName 

mkWeakSomeStableNameRefWithFinalizer :: SomeStableName -> IO () -> IO (Weak SomeStableName) Source #

Create a weak reference to a stable name with a finalizer.

mkWeakSomeStableNameRef :: SomeStableName -> IO (Weak SomeStableName) Source #

Create a weak reference to a stable name.