Copyright | (c) Sirui Lu 2021-2024 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Grisette.Internal.SymPrim.Prim.Internal.Caches
Description
Synopsis
- data SomeStableName where
- SomeStableName :: forall a. StableName a -> SomeStableName
- type Id = Word32
- type StableIdent = StableName (Any :: Type)
- type Digest = Word32
- data CachedInfo = CachedInfo {}
- class Interned t where
- data Description t
- type Uninterned t
- describe :: Uninterned t -> Description t
- identify :: CachedInfo -> Uninterned t -> t
- threadId :: t -> WeakThreadId
- descriptionDigest :: Description t -> Digest
- intern :: (Interned t, Typeable t, Hashable (Description t), Eq (Description t)) => Uninterned t -> IO t
- haveCache :: IO Bool
- threadCacheSize :: WeakThreadId -> IO Int
- threadCacheLiveSize :: WeakThreadId -> IO Int
Documentation
data SomeStableName where Source #
A type-erased stable name.
Constructors
SomeStableName :: forall a. StableName a -> SomeStableName |
Instances
Eq SomeStableName Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Utils Methods (==) :: SomeStableName -> SomeStableName -> Bool # (/=) :: SomeStableName -> SomeStableName -> Bool # |
type StableIdent = StableName (Any :: Type) Source #
The identity of a term.
data CachedInfo Source #
Information about a cached term.
Constructors
CachedInfo | |
Fields
|
Instances
NFData CachedInfo Source # | |
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Methods rnf :: CachedInfo -> () # |
class Interned t where Source #
A class for interning terms.
Methods
describe :: Uninterned t -> Description t Source #
identify :: CachedInfo -> Uninterned t -> t Source #
threadId :: t -> WeakThreadId Source #
descriptionDigest :: Description t -> Digest Source #
Instances
Interned (Term t) Source # | |||||||||
Defined in Grisette.Internal.SymPrim.Prim.Internal.Term Associated Types
Methods describe :: Uninterned (Term t) -> Description (Term t) Source # identify :: CachedInfo -> Uninterned (Term t) -> Term t Source # threadId :: Term t -> WeakThreadId Source # descriptionDigest :: Description (Term t) -> Digest Source # |
intern :: (Interned t, Typeable t, Hashable (Description t), Eq (Description t)) => Uninterned t -> IO t Source #
Internalize a term.
threadCacheSize :: WeakThreadId -> IO Int Source #
Get the size of the current thread's cache.
threadCacheLiveSize :: WeakThreadId -> IO Int Source #
Get the live size of the current thread's cache.