Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ListZipper a = ListZipper [a] a [a]
- newtype ListZipperOp a b = ListZipperOp (ListZipper a -> Maybe (ListZipper a, b))
- type ListZipperOp' a = ListZipperOp a ()
- class AsListZipper z a | z -> a where
- _ListZipper :: Prism' z (ListZipper a)
- class HasListZipper z a | z -> a where
- listZipper :: Lens' z (ListZipper a)
- focus :: Lens' z a
- leftz :: Lens' z [a]
- rightz :: Lens' z [a]
- class HasListZipperOp lo x y | lo -> x y where
- lo :: Lens' lo (ListZipperOp x y)
- class AsListZipperOp t x y | t -> x y where
- _ListZipperOp :: Prism' t (ListZipperOp x y)
- leftz' :: HasListZipper z a => Traversal' z a
- rightz' :: HasListZipper z a => Traversal' z a
- leftzrightz :: Traversal' (ListZipper a) a
- rightzleftz :: Traversal' (ListZipper a) a
- zipper :: [a] -> Maybe (ListZipper a)
- zipper0L :: a -> [a] -> ListZipper a
- zipper0L' :: NonEmpty a -> ListZipper a
- zipper0R :: [a] -> a -> ListZipper a
- zipper0R' :: NonEmpty a -> ListZipper a
- list :: ListZipper a -> [a]
- zipperIndices :: ListZipper a -> ListZipper (Int, a)
- moveLeft :: ListZipperOp' a
- moveRight :: ListZipperOp' a
- moveStart :: ListZipper a -> ListZipper a
- moveEnd :: ListZipper a -> ListZipper a
- moveLeftLoop :: ListZipper a -> ListZipper a
- moveRightLoop :: ListZipper a -> ListZipper a
- opWith :: ListZipperOp a b -> (a -> Maybe c) -> ListZipperOp a c
- moveLeftWith :: (a -> Maybe c) -> ListZipperOp a c
- moveRightWith :: (a -> Maybe c) -> ListZipperOp a c
- moveLeftRightWith :: (a -> Maybe c) -> ListZipperOp a c
- moveRightLeftWith :: (a -> Maybe c) -> ListZipperOp a c
- opWithThen :: ListZipperOp a b -> (a -> Maybe c) -> ListZipperOp a c
- moveLeftWithThen :: (a -> Maybe c) -> ListZipperOp a c
- moveRightWithThen :: (a -> Maybe c) -> ListZipperOp a c
- moveLeftRightWithThen :: (a -> Maybe c) -> ListZipperOp a c
- moveRightLeftWithThen :: (a -> Maybe c) -> ListZipperOp a c
- opUntil :: ListZipperOp a x -> (a -> Bool) -> ListZipperOp' a
- moveLeftUntil :: (a -> Bool) -> ListZipperOp' a
- moveRightUntil :: (a -> Bool) -> ListZipperOp' a
- moveLeftRightUntil :: (a -> Bool) -> ListZipperOp' a
- moveRightLeftUntil :: (a -> Bool) -> ListZipperOp' a
- opUntilThen :: ListZipperOp a x -> (a -> Bool) -> ListZipperOp' a
- moveLeftUntilThen :: (a -> Bool) -> ListZipperOp' a
- moveRightUntilThen :: (a -> Bool) -> ListZipperOp' a
- moveLeftRightUntilThen :: (a -> Bool) -> ListZipperOp' a
- moveRightLeftUntilThen :: (a -> Bool) -> ListZipperOp' a
- insertMoveLeft :: a -> ListZipper a -> ListZipper a
- insertMoveRight :: a -> ListZipper a -> ListZipper a
- deleteStepLeft :: ListZipperOp a a
- deleteStepRight :: ListZipperOp a a
- modifyFocus :: (a -> a) -> ListZipperOp a a
- setFocus :: a -> ListZipperOp a a
- atStart :: HasListZipper z a => z -> Bool
- atEnd :: HasListZipper z a => z -> Bool
- getFocus :: ListZipperOp a a
- getLeft :: ListZipperOp a a
- getRight :: ListZipperOp a a
- getRightz :: ListZipperOp a [a]
- getLeftz :: ListZipperOp a [a]
- getList :: ListZipperOp a [a]
- liftListZipperOp :: Maybe b -> ListZipperOp a b
- mkListZipperOp :: (ListZipper a -> Maybe b) -> ListZipperOp a b
- (<$~) :: ListZipperOp a b -> ListZipperOp a c -> ListZipperOp a b
- (*>>) :: (ListZipper a -> Maybe b) -> ListZipperOp a c -> ListZipperOp a b
- (<<*) :: ListZipperOp a c -> (ListZipper a -> Maybe b) -> ListZipperOp a b
- mkListZipperOp' :: (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp' a
- (.>>) :: (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp a b -> ListZipperOp' a
- (<<.) :: ListZipperOp a b -> (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp' a
- runListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a, x)
- execListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a)
- execListZipperOpOr :: ListZipperOp a x -> ListZipper a -> ListZipper a
- (##>) :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a)
- (<##) :: ListZipper a -> ListZipperOp a x -> Maybe (ListZipper a)
- evalListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe x
- (&&>) :: ListZipperOp a x -> ListZipper a -> Maybe x
- (<&&) :: ListZipper a -> ListZipperOp a x -> Maybe x
- execOpList :: ListZipperOp a x -> ListZipper a -> Maybe [a]
- (%%>) :: ListZipperOp a x -> ListZipper a -> Maybe [a]
- (<%%) :: ListZipper a -> ListZipperOp a x -> Maybe [a]
- execOpList' :: ListZipperOp a x -> ListZipper a -> [a]
- ($$>) :: ListZipperOp a x -> ListZipper a -> [a]
- (<$$) :: ListZipper a -> ListZipperOp a x -> [a]
- opWhileJust :: ListZipperOp' a -> ListZipper a -> ListZipper a
- shuffleLeft :: ListZipperOp' a
- shuffleRight :: ListZipperOp' a
- shuffleListZipper :: MonadRandom f => ListZipper a -> f (ListZipper a)
data types
data ListZipper a Source #
ListZipper [a] a [a] |
Instances
newtype ListZipperOp a b Source #
ListZipperOp (ListZipper a -> Maybe (ListZipper a, b)) |
Instances
type ListZipperOp' a = ListZipperOp a () Source #
lenses and prisms
class AsListZipper z a | z -> a where Source #
_ListZipper :: Prism' z (ListZipper a) Source #
Instances
AsListZipper (ListZipper a) a Source # | |
Defined in Data.ListZipper _ListZipper :: Prism' (ListZipper a) (ListZipper a) Source # |
class HasListZipper z a | z -> a where Source #
listZipper :: Lens' z (ListZipper a) Source #
Instances
HasListZipper (ListZipper a) a Source # | |
Defined in Data.ListZipper listZipper :: Lens' (ListZipper a) (ListZipper a) Source # focus :: Lens' (ListZipper a) a Source # leftz :: Lens' (ListZipper a) [a] Source # rightz :: Lens' (ListZipper a) [a] Source # |
class HasListZipperOp lo x y | lo -> x y where Source #
lo :: Lens' lo (ListZipperOp x y) Source #
Instances
HasListZipperOp (ListZipperOp x y) x y Source # | |
Defined in Data.ListZipper lo :: Lens' (ListZipperOp x y) (ListZipperOp x y) Source # |
class AsListZipperOp t x y | t -> x y where Source #
_ListZipperOp :: Prism' t (ListZipperOp x y) Source #
Instances
AsListZipperOp (ListZipperOp x y) x y Source # | |
Defined in Data.ListZipper _ListZipperOp :: Prism' (ListZipperOp x y) (ListZipperOp x y) Source # |
traversals
leftz' :: HasListZipper z a => Traversal' z a Source #
rightz' :: HasListZipper z a => Traversal' z a Source #
leftzrightz :: Traversal' (ListZipper a) a Source #
rightzleftz :: Traversal' (ListZipper a) a Source #
make zippers
zipper :: [a] -> Maybe (ListZipper a) Source #
zipper0L :: a -> [a] -> ListZipper a Source #
zipper0L' :: NonEmpty a -> ListZipper a Source #
zipper0R :: [a] -> a -> ListZipper a Source #
zipper0R' :: NonEmpty a -> ListZipper a Source #
rezip
list :: ListZipper a -> [a] Source #
indices
zipperIndices :: ListZipper a -> ListZipper (Int, a) Source #
movement
moveLeft :: ListZipperOp' a Source #
moveRight :: ListZipperOp' a Source #
moveStart :: ListZipper a -> ListZipper a Source #
moveEnd :: ListZipper a -> ListZipper a Source #
moveLeftLoop :: ListZipper a -> ListZipper a Source #
moveRightLoop :: ListZipper a -> ListZipper a Source #
opWith :: ListZipperOp a b -> (a -> Maybe c) -> ListZipperOp a c Source #
moveLeftWith :: (a -> Maybe c) -> ListZipperOp a c Source #
moveRightWith :: (a -> Maybe c) -> ListZipperOp a c Source #
moveLeftRightWith :: (a -> Maybe c) -> ListZipperOp a c Source #
moveRightLeftWith :: (a -> Maybe c) -> ListZipperOp a c Source #
opWithThen :: ListZipperOp a b -> (a -> Maybe c) -> ListZipperOp a c Source #
moveLeftWithThen :: (a -> Maybe c) -> ListZipperOp a c Source #
moveRightWithThen :: (a -> Maybe c) -> ListZipperOp a c Source #
moveLeftRightWithThen :: (a -> Maybe c) -> ListZipperOp a c Source #
moveRightLeftWithThen :: (a -> Maybe c) -> ListZipperOp a c Source #
opUntil :: ListZipperOp a x -> (a -> Bool) -> ListZipperOp' a Source #
moveLeftUntil :: (a -> Bool) -> ListZipperOp' a Source #
moveRightUntil :: (a -> Bool) -> ListZipperOp' a Source #
moveLeftRightUntil :: (a -> Bool) -> ListZipperOp' a Source #
moveRightLeftUntil :: (a -> Bool) -> ListZipperOp' a Source #
opUntilThen :: ListZipperOp a x -> (a -> Bool) -> ListZipperOp' a Source #
moveLeftUntilThen :: (a -> Bool) -> ListZipperOp' a Source #
moveRightUntilThen :: (a -> Bool) -> ListZipperOp' a Source #
moveLeftRightUntilThen :: (a -> Bool) -> ListZipperOp' a Source #
moveRightLeftUntilThen :: (a -> Bool) -> ListZipperOp' a Source #
insertion
insertMoveLeft :: a -> ListZipper a -> ListZipper a Source #
insertMoveRight :: a -> ListZipper a -> ListZipper a Source #
deletion
deleteStepLeft :: ListZipperOp a a Source #
deleteStepRight :: ListZipperOp a a Source #
modifcation
modifyFocus :: (a -> a) -> ListZipperOp a a Source #
setFocus :: a -> ListZipperOp a a Source #
focus position
atStart :: HasListZipper z a => z -> Bool Source #
atEnd :: HasListZipper z a => z -> Bool Source #
get context
getFocus :: ListZipperOp a a Source #
getLeft :: ListZipperOp a a Source #
getRight :: ListZipperOp a a Source #
getRightz :: ListZipperOp a [a] Source #
getLeftz :: ListZipperOp a [a] Source #
getList :: ListZipperOp a [a] Source #
list zipper state operations
liftListZipperOp :: Maybe b -> ListZipperOp a b Source #
mkListZipperOp :: (ListZipper a -> Maybe b) -> ListZipperOp a b Source #
(<$~) :: ListZipperOp a b -> ListZipperOp a c -> ListZipperOp a b infixl 5 Source #
(*>>) :: (ListZipper a -> Maybe b) -> ListZipperOp a c -> ListZipperOp a b infixl 5 Source #
(<<*) :: ListZipperOp a c -> (ListZipper a -> Maybe b) -> ListZipperOp a b infixl 5 Source #
mkListZipperOp' :: (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp' a Source #
(.>>) :: (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp a b -> ListZipperOp' a infixl 5 Source #
(<<.) :: ListZipperOp a b -> (ListZipper a -> Maybe (ListZipper a)) -> ListZipperOp' a infixl 5 Source #
runListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a, x) Source #
execListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a) Source #
execListZipperOpOr :: ListZipperOp a x -> ListZipper a -> ListZipper a Source #
(##>) :: ListZipperOp a x -> ListZipper a -> Maybe (ListZipper a) infixl 6 Source #
(<##) :: ListZipper a -> ListZipperOp a x -> Maybe (ListZipper a) infixl 6 Source #
evalListZipperOp :: ListZipperOp a x -> ListZipper a -> Maybe x Source #
(&&>) :: ListZipperOp a x -> ListZipper a -> Maybe x infixl 6 Source #
(<&&) :: ListZipper a -> ListZipperOp a x -> Maybe x infixl 6 Source #
execOpList :: ListZipperOp a x -> ListZipper a -> Maybe [a] Source #
(%%>) :: ListZipperOp a x -> ListZipper a -> Maybe [a] infixl 5 Source #
(<%%) :: ListZipper a -> ListZipperOp a x -> Maybe [a] infixl 5 Source #
execOpList' :: ListZipperOp a x -> ListZipper a -> [a] Source #
($$>) :: ListZipperOp a x -> ListZipper a -> [a] infixl 5 Source #
(<$$) :: ListZipper a -> ListZipperOp a x -> [a] infixl 5 Source #
opWhileJust :: ListZipperOp' a -> ListZipper a -> ListZipper a Source #
list zipper state operations
shuffleLeft :: ListZipperOp' a Source #
shuffleRight :: ListZipperOp' a Source #
shuffleListZipper :: MonadRandom f => ListZipper a -> f (ListZipper a) Source #