hxt-9.3.1.16: A collection of tools for processing XML with Haskell.

Safe HaskellSafe
LanguageHaskell98

Data.Function.Selector

Synopsis

Documentation

data Selector s a Source #

A Selector is a pair of an access function and a modifying function for reading and updating parts of a composite type

Constructors

S 

Fields

Instances

Category * Selector Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

chgS :: Selector s a -> (a -> a) -> s -> s Source #

chgM :: Monad m => Selector s a -> (a -> m a) -> s -> m s Source #

mkSelector :: (s -> a) -> (a -> s -> s) -> Selector s a Source #

Alias for constructor S

(.&&&.) :: Selector s a -> Selector s b -> Selector s (a, b) infixr 3 Source #

class Comp1 s a | s -> a where Source #

Selectors for pairs and 3-tuples: comp1, comp2, comp3, this can be extended to n-tuples

Minimal complete definition

comp1

Methods

comp1 :: Selector s a Source #

Instances

Comp1 (a, b) a Source # 

Methods

comp1 :: Selector (a, b) a Source #

Comp1 (a, b, c) a Source # 

Methods

comp1 :: Selector (a, b, c) a Source #

class Comp2 s a | s -> a where Source #

Minimal complete definition

comp2

Methods

comp2 :: Selector s a Source #

Instances

Comp2 (a, b) b Source # 

Methods

comp2 :: Selector (a, b) b Source #

Comp2 (a, b, c) b Source # 

Methods

comp2 :: Selector (a, b, c) b Source #

class Comp3 s a | s -> a where Source #

Minimal complete definition

comp3

Methods

comp3 :: Selector s a Source #

Instances

Comp3 (a, b, c) c Source # 

Methods

comp3 :: Selector (a, b, c) c Source #