|
|
|
|
| Synopsis |
|
| gSet :: (Data b, Typeable a) => a -> b -> b | | | gReplace :: (Typeable a, Data b) => (a -> a) -> b -> b | | | gFind :: (MonadPlus m, Data a, Typeable b) => a -> m b | | | gFind' :: (Data a, Typeable b) => a -> b | | | gModify :: (MonadState s m, Typeable a, Data s) => (a -> a) -> m () | | | gAsk :: (Data r, Typeable a, MonadReader r m, MonadPlus n) => (a -> n b) -> m (n b) | | | gGet :: (Data s, Typeable a, MonadState s m, MonadPlus n) => (a -> n b) -> c -> m (n b) |
|
|
| Documentation |
|
|
| gSet x y will traveral x and replace
any instances of the type a in its structure
with y.
|
|
|
| gReplace f b will traverse x and will act on
any instance of the type a in its structure with
the function f.
|
|
|
| gFind a will extract any elements of type b from
a's structure in accordance with the MonadPlus
instance, e.g. Maybe Foo will return the first Foo
found while [Foo] will return the list of Foos found.
|
|
|
| Acts as gFind but will throw an exception if
nothing is found.
|
|
|
| A generalized modify that will apply the modification
function to the structure of the state.
|
|
|
| A generalized ask that will traverse the
stored type of the MonadReader in an attempt to find
an a and will then apply the provided function if
found.
|
|
|
| The equivalent of gAsk for MonadState
|
|
| Produced by Haddock version 2.6.1 |