Portability | portable |
---|---|
Stability | experimental |
Maintainer | Ralf Laemmel, Joost Visser |
Safe Haskell | None |
This module is part of StrategyLib
, a library of functional strategy
combinators, including combinators for generic traversal. This module
provides combinators which allow one to use strategies to construct
generic containers.
- modify :: Eq x => (x -> y) -> x -> y -> x -> y
- modifyTP :: (MonadPlus m, Eq t, Term t) => TP m -> t -> m t -> TP m
- modifyTU :: (MonadPlus m, Eq t, Term t) => TU a m -> t -> m a -> TU a m
- type GSet = TU () Maybe
- emptyGSet :: GSet
- fullGSet :: GSet
- addGSet :: (Eq t, Term t) => t -> GSet -> GSet
- removeGSet :: (Eq t, Term t) => t -> GSet -> GSet
- containsGSet :: (Eq t, Term t) => t -> GSet -> Bool
- type GMap value = TU value Maybe
- emptyGMap :: GMap v
- removeGMap :: (Eq t, Term t) => t -> GMap v -> GMap v
- containsGMap :: (Eq t, Term t) => t -> GMap v -> Bool
- putGMap :: (Eq t, Term t) => t -> v -> GMap v -> GMap v
- getGMap :: (Eq t, Term t) => t -> GMap v -> Maybe v
- type GList = (Integer -> TP Maybe, Integer)
- sizeGList :: (t, t1) -> t1
- indxGList :: (t, t1) -> t
- emptyGList :: GList
- addGList :: Term t => t -> GList -> GList
- putGList :: Term t => Integer -> t -> GList -> GList
- getGList :: Term t => Integer -> GList -> Maybe t
- mapGListTP :: TP Maybe -> GList -> GList
- mapGListTU :: Term t => (t -> ()) -> TU a Maybe -> GList -> [Maybe a]
- elemsGList :: Term t => (t -> ()) -> GList -> [t]
- nth :: [a] -> Integer -> a
- type Coder = (Int, TU Int Maybe)
- noCode :: Coder
- getCode :: Term x => Coder -> x -> Maybe Int
- setCode :: (Term x, Eq x) => Coder -> x -> Int -> Coder
- nextCode :: Coder -> (Int, Coder)
- enCode :: (Term x, Eq x) => Coder -> x -> Coder
Pointwise function update
modifyTP :: (MonadPlus m, Eq t, Term t) => TP m -> t -> m t -> TP mSource
Pointwise modification of type-preserving strategies
modifyTU :: (MonadPlus m, Eq t, Term t) => TU a m -> t -> m a -> TU a mSource
Pointwise modification of type-unifying strategies
Generic Set (not observable)
containsGSet :: (Eq t, Term t) => t -> GSet -> BoolSource
Test whether a given element is contained in a generic set
Generic Map (not observable)
removeGMap :: (Eq t, Term t) => t -> GMap v -> GMap vSource
Remove an element from a generic map (my key)
containsGMap :: (Eq t, Term t) => t -> GMap v -> BoolSource
Test whether an element with given key is contained in a generic map
putGMap :: (Eq t, Term t) => t -> v -> GMap v -> GMap vSource
Add an entry with given key and value to a generic map
getGMap :: (Eq t, Term t) => t -> GMap v -> Maybe vSource
Obtain the value for a given key from a generic map
elemsGList :: Term t => (t -> ()) -> GList -> [t]Source