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

Safe HaskellSafe-Inferred

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

getS :: s -> a
 
setS :: a -> s -> s
 

Instances

chgS :: Selector s a -> (a -> a) -> s -> sSource

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

mkSelector :: (s -> a) -> (a -> s -> s) -> Selector s aSource

Alias for constructor S

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

class Comp1 s a | s -> a whereSource

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

Methods

comp1 :: Selector s aSource

Instances

Comp1 (a, b) a 
Comp1 (a, b, c) a 

class Comp2 s a | s -> a whereSource

Methods

comp2 :: Selector s aSource

Instances

Comp2 (a, b) b 
Comp2 (a, b, c) b 

class Comp3 s a | s -> a whereSource

Methods

comp3 :: Selector s aSource

Instances

Comp3 (a, b, c) c