Agda-2.5.1: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell98

Agda.Utils.Pointer

Synopsis

Documentation

data Ptr a Source

newPtr :: a -> Ptr a Source

derefPtr :: Ptr a -> a Source

setPtr :: a -> Ptr a -> Ptr a Source

updatePtr :: (a -> a) -> Ptr a -> Ptr a Source

updatePtrM :: Functor f => (a -> f a) -> Ptr a -> f (Ptr a) Source

If f a contains many copies of a they will all be the same pointer in the result. If the function is well-behaved (i.e. preserves the implicit equivalence, this shouldn't matter).