Strafunski-StrategyLib-5.0.0.3: Library for strategic programming

Portabilityportable
Stabilityexperimental
MaintainerRalf Laemmel, Joost Visser
Safe HaskellNone

Data.Generics.Strafunski.StrategyLib.ContainerTheme

Contents

Description

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.

Synopsis

Pointwise function update

modify :: Eq x => (x -> y) -> x -> y -> x -> ySource

Pointwise modification of monomorphic functions

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)

type GSet = TU () MaybeSource

Type of generic sets

emptyGSet :: GSetSource

Empty generic set.

fullGSet :: GSetSource

Completely filled generic set

addGSet :: (Eq t, Term t) => t -> GSet -> GSetSource

Add an element to a generic set

removeGSet :: (Eq t, Term t) => t -> GSet -> GSetSource

Remove an element from a generic set

containsGSet :: (Eq t, Term t) => t -> GSet -> BoolSource

Test whether a given element is contained in a generic set

Generic Map (not observable)

type GMap value = TU value MaybeSource

Type of generic maps

emptyGMap :: GMap vSource

Empty generic map

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

sizeGList :: (t, t1) -> t1Source

indxGList :: (t, t1) -> tSource

addGList :: Term t => t -> GList -> GListSource

mapGListTU :: Term t => (t -> ()) -> TU a Maybe -> GList -> [Maybe a]Source

elemsGList :: Term t => (t -> ()) -> GList -> [t]Source

nth :: [a] -> Integer -> aSource

getCode :: Term x => Coder -> x -> Maybe IntSource

setCode :: (Term x, Eq x) => Coder -> x -> Int -> CoderSource

enCode :: (Term x, Eq x) => Coder -> x -> CoderSource