Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data Selector s a = S {}
- chgS :: Selector s a -> (a -> a) -> s -> s
- chgM :: Monad m => Selector s a -> (a -> m a) -> s -> m s
- mkSelector :: (s -> a) -> (a -> s -> s) -> Selector s a
- idS :: Selector s s
- (.&&&.) :: Selector s a -> Selector s b -> Selector s (a, b)
- class Comp1 s a | s -> a where
- class Comp2 s a | s -> a where
- class Comp3 s a | s -> a where
Documentation
A Selector is a pair of an access function and a modifying function for reading and updating parts of a composite type
mkSelector :: (s -> a) -> (a -> s -> s) -> Selector s a Source #
Alias for constructor S
class Comp1 s a | s -> a where Source #
Selectors for pairs and 3-tuples: comp1, comp2, comp3, this can be extended to n-tuples