Maintainer | Ralf Laemmel, Joost Visser |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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
modify :: Eq x => (x -> y) -> x -> y -> x -> y Source #
Pointwise modification of monomorphic functions
modifyTP :: (MonadPlus m, Eq t, Term t) => TP m -> t -> m t -> TP m Source #
Pointwise modification of type-preserving strategies
modifyTU :: (MonadPlus m, Eq t, Term t) => TU a m -> t -> m a -> TU a m Source #
Pointwise modification of type-unifying strategies
Generic Set (not observable)
containsGSet :: (Eq t, Term t) => t -> GSet -> Bool Source #
Test whether a given element is contained in a generic set
Generic Map (not observable)
removeGMap :: (Eq t, Term t) => t -> GMap v -> GMap v Source #
Remove an element from a generic map (my key)
containsGMap :: (Eq t, Term t) => t -> GMap v -> Bool Source #
Test whether an element with given key is contained in a generic map
putGMap :: (Eq t, Term t) => t -> v -> GMap v -> GMap v Source #
Add an entry with given key and value to a generic map
getGMap :: (Eq t, Term t) => t -> GMap v -> Maybe v Source #
Obtain the value for a given key from a generic map
emptyGList :: GList Source #
elemsGList :: Term t => (t -> ()) -> GList -> [t] Source #