Agda-2.6.4.3: A dependently typed functional programming language and proof assistant
Safe HaskellNone
LanguageHaskell2010

Agda.Utils.Pointer

Synopsis

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 #

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

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

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

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

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

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

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

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

toList :: Ptr a -> [a] #

null :: Ptr a -> Bool #

length :: Ptr a -> Int #

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

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

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

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

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

Traversable Ptr Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

traverse :: Applicative f => (a -> f b) -> Ptr a -> f (Ptr b) #

sequenceA :: Applicative f => Ptr (f a) -> f (Ptr a) #

mapM :: Monad m => (a -> m b) -> Ptr a -> m (Ptr b) #

sequence :: Monad m => Ptr (m a) -> m (Ptr a) #

Functor Ptr Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

fmap :: (a -> b) -> Ptr a -> Ptr b #

(<$) :: a -> Ptr b -> Ptr a #

Show a => Show (Ptr a) Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

NFData (Ptr a) Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

rnf :: Ptr a -> () #

Eq (Ptr a) Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

(==) :: Ptr a -> Ptr a -> Bool #

(/=) :: Ptr a -> Ptr a -> Bool #

Ord (Ptr a) Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

compare :: Ptr a -> Ptr a -> Ordering #

(<) :: Ptr a -> Ptr a -> Bool #

(<=) :: Ptr a -> Ptr a -> Bool #

(>) :: Ptr a -> Ptr a -> Bool #

(>=) :: Ptr a -> Ptr a -> Bool #

max :: Ptr a -> Ptr a -> Ptr a #

min :: Ptr a -> Ptr a -> Ptr a #

Hashable (Ptr a) Source # 
Instance details

Defined in Agda.Utils.Pointer

Methods

hashWithSalt :: Int -> Ptr a -> Int

hash :: Ptr a -> Int

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