| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ivory.Language.Ref
Synopsis
- type ConstRef = Pointer Valid Const
- class IvoryRef (ref :: RefScope -> Area * -> *)
- class IvoryVar a => IvoryStore a
- type Ref = Pointer Valid Mutable
- constRef :: IvoryArea area => Ref s area -> ConstRef s area
- deref :: forall eff ref s a. (IvoryStore a, IvoryVar a, IvoryVar (ref s (Stored a)), IvoryRef ref) => ref s (Stored a) -> Ivory eff a
- refCopy :: forall eff sTo ref sFrom a. (IvoryRef ref, IvoryVar (Ref sTo a), IvoryVar (ref sFrom a), IvoryArea a) => Ref sTo a -> ref sFrom a -> Ivory eff ()
- store :: forall eff s a. IvoryStore a => Ref s (Stored a) -> a -> Ivory eff ()
Documentation
class IvoryRef (ref :: RefScope -> Area * -> *) Source #
TODO remove class, leave function only
Minimal complete definition
unwrapRef
class IvoryVar a => IvoryStore a Source #
Things that can be safely stored in references.
Instances
| IvoryStore IChar Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Sint64 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Sint32 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Sint16 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Sint8 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Uint64 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Uint32 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Uint16 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore Uint8 Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore IBool Source # | |
Defined in Ivory.Language.Ref | |
| IvoryStore IDouble Source # | |
Defined in Ivory.Language.Float | |
| IvoryStore IFloat Source # | |
Defined in Ivory.Language.Float | |
| ANat n => IvoryStore (Ix n) Source # | |
Defined in Ivory.Language.Array | |
| IvoryRep (BitRep n) => IvoryStore (Bits n) Source # | |
Defined in Ivory.Language.BitData.Bits | |
| (KnownConstancy c, IvoryArea a) => IvoryStore (Pointer Nullable c Global a) Source # | |
Defined in Ivory.Language.Ref | |
constRef :: IvoryArea area => Ref s area -> ConstRef s area Source #
Turn a reference into a constant reference.
TODO deprecate in favor of pointerCastToConst
deref :: forall eff ref s a. (IvoryStore a, IvoryVar a, IvoryVar (ref s (Stored a)), IvoryRef ref) => ref s (Stored a) -> Ivory eff a Source #
Dereferenceing.