planet-mitchell-0.1.0: Planet Mitchell

Safe HaskellNone
LanguageHaskell2010

Ptr.Static

Synopsis

Documentation

data StaticPtr a #

A reference to a value of type a.

Instances
IsStatic StaticPtr

Since: base-4.9.0.0

Instance details

Defined in GHC.StaticPtr

deRefStaticPtr :: StaticPtr a -> a #

Dereferences a static pointer.

type StaticKey = Fingerprint #

A key for StaticPtrs that can be serialized and used with unsafeLookupStaticPtr.

staticKey :: StaticPtr a -> StaticKey #

The StaticKey that can be used to look up the given StaticPtr.

unsafeLookupStaticPtr :: StaticKey -> IO (Maybe (StaticPtr a)) #

Looks up a StaticPtr by its StaticKey.

If the StaticPtr is not found returns Nothing.

This function is unsafe because the program behavior is undefined if the type of the returned StaticPtr does not match the expected one.

data StaticPtrInfo #

Miscelaneous information available for debugging purposes.

Constructors

StaticPtrInfo 

Fields

Instances
Show StaticPtrInfo 
Instance details

Defined in GHC.StaticPtr

staticPtrKeys :: IO [StaticKey] #

A list of all known keys.

class IsStatic (p :: * -> *) where #

A class for things buildable from static pointers.

Minimal complete definition

fromStaticPtr

Methods

fromStaticPtr :: StaticPtr a -> p a #

Instances
IsStatic StaticPtr

Since: base-4.9.0.0

Instance details

Defined in GHC.StaticPtr