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

Safe HaskellNone

Agda.Utils.Pointer

Synopsis

Documentation

data Ptr a Source

Instances

newPtr :: a -> Ptr aSource

setPtr :: a -> Ptr a -> Ptr aSource

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

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).