Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Ref s a = Ref {}
- constRef :: IvoryArea area => Ref s area -> ConstRef s area
- newtype ConstRef s a = ConstRef {
- getConstRef :: Expr
- class IvoryRef ref where
- 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 ()
- class IvoryVar a => IvoryStore a
Documentation
A non-null pointer to a memory area.
constRef :: IvoryArea area => Ref s area -> ConstRef s area Source
Turn a reference into a constant reference.
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.
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 () Source
Memory copy. Emits an assertion that the two references are unequal.
class IvoryVar a => IvoryStore a Source
Things that can be safely stored in references.