Agda-2.6.4: A dependently typed functional programming language and proof assistant
Safe HaskellSafe-Inferred
LanguageHaskell2010

Agda.Utils.Zipper

Documentation

class Zipper z where Source #

Associated Types

type Carrier z Source #

type Element z Source #

Methods

firstHole :: Carrier z -> Maybe (Element z, z) Source #

plugHole :: Element z -> z -> Carrier z Source #

nextHole :: Element z -> z -> Either (Carrier z) (Element z, z) Source #

Instances

Instances details
Zipper (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

Associated Types

type Carrier (ListZipper a) Source #

type Element (ListZipper a) Source #

(Zipper f, Zipper g, Element f ~ Carrier g) => Zipper (ComposeZipper f g) Source # 
Instance details

Defined in Agda.Utils.Zipper

Associated Types

type Carrier (ComposeZipper f g) Source #

type Element (ComposeZipper f g) Source #

data ListZipper a Source #

Constructors

ListZip [a] [a] 

Instances

Instances details
Foldable ListZipper Source # 
Instance details

Defined in Agda.Utils.Zipper

Methods

fold :: Monoid m => ListZipper m -> m

foldMap :: Monoid m => (a -> m) -> ListZipper a -> m

foldMap' :: Monoid m => (a -> m) -> ListZipper a -> m

foldr :: (a -> b -> b) -> b -> ListZipper a -> b

foldr' :: (a -> b -> b) -> b -> ListZipper a -> b

foldl :: (b -> a -> b) -> b -> ListZipper a -> b

foldl' :: (b -> a -> b) -> b -> ListZipper a -> b

foldr1 :: (a -> a -> a) -> ListZipper a -> a

foldl1 :: (a -> a -> a) -> ListZipper a -> a

toList :: ListZipper a -> [a]

null :: ListZipper a -> Bool

length :: ListZipper a -> Int

elem :: Eq a => a -> ListZipper a -> Bool

maximum :: Ord a => ListZipper a -> a

minimum :: Ord a => ListZipper a -> a

sum :: Num a => ListZipper a -> a

product :: Num a => ListZipper a -> a

Traversable ListZipper Source # 
Instance details

Defined in Agda.Utils.Zipper

Methods

traverse :: Applicative f => (a -> f b) -> ListZipper a -> f (ListZipper b)

sequenceA :: Applicative f => ListZipper (f a) -> f (ListZipper a)

mapM :: Monad m => (a -> m b) -> ListZipper a -> m (ListZipper b)

sequence :: Monad m => ListZipper (m a) -> m (ListZipper a)

Functor ListZipper Source # 
Instance details

Defined in Agda.Utils.Zipper

Methods

fmap :: (a -> b) -> ListZipper a -> ListZipper b

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

Zipper (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

Associated Types

type Carrier (ListZipper a) Source #

type Element (ListZipper a) Source #

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

Defined in Agda.Utils.Zipper

Methods

showsPrec :: Int -> ListZipper a -> ShowS

show :: ListZipper a -> String

showList :: [ListZipper a] -> ShowS

Eq a => Eq (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

Methods

(==) :: ListZipper a -> ListZipper a -> Bool

(/=) :: ListZipper a -> ListZipper a -> Bool

Ord a => Ord (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

Methods

compare :: ListZipper a -> ListZipper a -> Ordering

(<) :: ListZipper a -> ListZipper a -> Bool

(<=) :: ListZipper a -> ListZipper a -> Bool

(>) :: ListZipper a -> ListZipper a -> Bool

(>=) :: ListZipper a -> ListZipper a -> Bool

max :: ListZipper a -> ListZipper a -> ListZipper a

min :: ListZipper a -> ListZipper a -> ListZipper a

type Carrier (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

type Carrier (ListZipper a) = [a]
type Element (ListZipper a) Source # 
Instance details

Defined in Agda.Utils.Zipper

type Element (ListZipper a) = a

data ComposeZipper f g Source #

Constructors

ComposeZip f g 

Instances

Instances details
(Zipper f, Zipper g, Element f ~ Carrier g) => Zipper (ComposeZipper f g) Source # 
Instance details

Defined in Agda.Utils.Zipper

Associated Types

type Carrier (ComposeZipper f g) Source #

type Element (ComposeZipper f g) Source #

type Carrier (ComposeZipper f g) Source # 
Instance details

Defined in Agda.Utils.Zipper

type Element (ComposeZipper f g) Source # 
Instance details

Defined in Agda.Utils.Zipper