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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Agda.Utils.Pointer

Contents

- Orphan instances

Synopsis

- data Ptr a
- newPtr :: a -> Ptr a
- derefPtr :: Ptr a -> a
- setPtr :: a -> Ptr a -> Ptr a
- updatePtr :: (a -> a) -> Ptr a -> Ptr a
- updatePtrM :: Functor f => (a -> f a) -> Ptr a -> f (Ptr a)

# Documentation

data Ptr a Source #

#### Instances

Instances details

Foldable Ptr Source # |

Instance details

Defined in Agda.Utils.Pointer

Methods

fold :: Monoid m => Ptr m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ptr a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ptr a -> m Source #

foldr :: (a -> b -> b) -> b -> Ptr a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ptr a -> b Source #

foldl :: (b -> a -> b) -> b -> Ptr a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ptr a -> b Source #

foldr1 :: (a -> a -> a) -> Ptr a -> a Source #

foldl1 :: (a -> a -> a) -> Ptr a -> a Source #

toList :: Ptr a -> [a] Source #

null :: Ptr a -> Bool Source #

length :: Ptr a -> Int Source #

elem :: Eq a => a -> Ptr a -> Bool Source #

maximum :: Ord a => Ptr a -> a Source #

minimum :: Ord a => Ptr a -> a Source #

sum :: Num a => Ptr a -> a Source #

product :: Num a => Ptr a -> a Source #

Traversable Ptr Source # |
Instance details Defined in Agda.Utils.Pointer Methods traverse :: Applicative f => (a -> f b) -> Ptr a -> f (Ptr b) Source # sequenceA :: Applicative f => Ptr (f a) -> f (Ptr a) Source # mapM :: Monad m => (a -> m b) -> Ptr a -> m (Ptr b) Source # sequence :: Monad m => Ptr (m a) -> m (Ptr a) Source #
Functor Ptr Source # |
Instance details Defined in Agda.Utils.Pointer Methods fmap :: (a -> b) -> Ptr a -> Ptr b Source # (<$) :: a -> Ptr b -> Ptr a Source #
Data a => Data (Ptr a) Source # |

Instance details

Defined in Agda.Utils.Pointer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ptr a -> c (Ptr a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ptr a) Source #

toConstr :: Ptr a -> Constr Source #

dataTypeOf :: Ptr a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ptr a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ptr a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Ptr a -> Ptr a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Ptr a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ptr a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source #

Show a => Show (Ptr a) Source # |
Instance details Defined in Agda.Utils.Pointer Methods showsPrec :: Int -> Ptr a -> ShowS Source # show :: Ptr a -> String Source # showList :: [Ptr a] -> ShowS Source #
NFData (Ptr a) Source # |
Instance details Defined in Agda.Utils.Pointer Methods rnf :: Ptr a -> () Source #
Eq (Ptr a) Source # |
Instance details Defined in Agda.Utils.Pointer Methods (==) :: Ptr a -> Ptr a -> Bool Source # (/=) :: Ptr a -> Ptr a -> Bool Source #
Ord (Ptr a) Source # |
Instance details Defined in Agda.Utils.Pointer Methods compare :: Ptr a -> Ptr a -> Ordering Source # (<) :: Ptr a -> Ptr a -> Bool Source # (<=) :: Ptr a -> Ptr a -> Bool Source # (>) :: Ptr a -> Ptr a -> Bool Source # (>=) :: Ptr a -> Ptr a -> Bool Source # max :: Ptr a -> Ptr a -> Ptr a Source # min :: Ptr a -> Ptr a -> Ptr a Source #
Hashable (Ptr a) Source # |
Instance details Defined in Agda.Utils.Pointer Methods hashWithSalt :: Int -> Ptr a -> Int Source # hash :: Ptr a -> Int 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).

# Orphan instances

Typeable a => Data (IORef a) Source # |

Instance details

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IORef a -> c (IORef a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IORef a) Source #

toConstr :: IORef a -> Constr Source #

dataTypeOf :: IORef a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IORef a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IORef a)) Source #

gmapT :: (forall b. Data b => b -> b) -> IORef a -> IORef a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IORef a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IORef a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> IORef a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IORef a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IORef a -> m (IORef a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IORef a -> m (IORef a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IORef a -> m (IORef a) Source #