Copyright | (c) Antony Courtney and Henrik Nilsson Yale University 2003 |
---|---|

License | BSD-style (see the LICENSE file in the distribution) |

Maintainer | nilsson@cs.yale.edu |

Stability | provisional |

Portability | portable |

Safe Haskell | Safe |

Language | Haskell98 |

Collection of entities that really should be part of Haskell base, other packages, or simply have no better home.

## Synopsis

- (#) :: (a -> b) -> (b -> c) -> a -> c
- dup :: a -> (a, a)
- mapFst :: (a -> b) -> [(a, c)] -> [(b, c)]
- mapSnd :: (a -> b) -> [(c, a)] -> [(c, b)]
- sel3_1 :: (a, b, c) -> a
- sel3_2 :: (a, b, c) -> b
- sel3_3 :: (a, b, c) -> c
- sel4_1 :: (a, b, c, d) -> a
- sel4_2 :: (a, b, c, d) -> b
- sel4_3 :: (a, b, c, d) -> c
- sel4_4 :: (a, b, c, d) -> d
- sel5_1 :: (a, b, c, d, e) -> a
- sel5_2 :: (a, b, c, d, e) -> b
- sel5_3 :: (a, b, c, d, e) -> c
- sel5_4 :: (a, b, c, d, e) -> d
- sel5_5 :: (a, b, c, d, e) -> e
- fDiv :: RealFrac a => a -> a -> Integer
- fMod :: RealFrac a => a -> a -> a
- fDivMod :: RealFrac a => a -> a -> (Integer, a)
- arr2 :: Arrow a => (b -> c -> d) -> a (b, c) d
- arr3 :: Arrow a => (b -> c -> d -> e) -> a (b, c, d) e
- arr4 :: Arrow a => (b -> c -> d -> e -> f) -> a (b, c, d, e) f
- arr5 :: Arrow a => (b -> c -> d -> e -> f -> g) -> a (b, c, d, e, f) g
- lift0 :: Arrow a => c -> a b c
- lift1 :: Arrow a => (c -> d) -> a b c -> a b d
- lift2 :: Arrow a => (c -> d -> e) -> a b c -> a b d -> a b e
- lift3 :: Arrow a => (c -> d -> e -> f) -> a b c -> a b d -> a b e -> a b f
- lift4 :: Arrow a => (c -> d -> e -> f -> g) -> a b c -> a b d -> a b e -> a b f -> a b g
- lift5 :: Arrow a => (c -> d -> e -> f -> g -> h) -> a b c -> a b d -> a b e -> a b f -> a b g -> a b h

# Reverse function composition

(#) :: (a -> b) -> (b -> c) -> a -> c infixl 9 Source #

Deprecated: Use Control.Arrow.(>>>) and Control.Arrow.(<<<).

Reverse function composition

# Arrow plumbing aids

# Maps over lists of pairs

mapFst :: (a -> b) -> [(a, c)] -> [(b, c)] Source #

Deprecated: mapFst is not used by Yampa and will be removed from the next release

Map a function over the first component of pairs in a list.

mapSnd :: (a -> b) -> [(c, a)] -> [(c, b)] Source #

Deprecated: mapSnd is not used by Yampa and will be removed from the next release

Map a function over the second component of pairs in a list.

# Generalized tuple selectors

sel3_1 :: (a, b, c) -> a Source #

Deprecated: Use the tuple package instead.

Select the first component of a triple.

sel3_2 :: (a, b, c) -> b Source #

Deprecated: Use the tuple package instead.

Select the second component of a triple.

sel3_3 :: (a, b, c) -> c Source #

Deprecated: Use the tuple package instead.

Select the third component of a triple.

sel4_1 :: (a, b, c, d) -> a Source #

Deprecated: Use the tuple package instead.

Select the first component of a 4-element tuple.

sel4_2 :: (a, b, c, d) -> b Source #

Deprecated: Use the tuple package instead.

Select the second component of a 4-element tuple.

sel4_3 :: (a, b, c, d) -> c Source #

Deprecated: Use the tuple package instead.

Select the third component of a 4-element tuple.

sel4_4 :: (a, b, c, d) -> d Source #

Deprecated: Use the tuple package instead.

Select the fourth component of a 4-element tuple.

sel5_1 :: (a, b, c, d, e) -> a Source #

Deprecated: Use the tuple package instead.

Select the first component of a 5-element tuple.

sel5_2 :: (a, b, c, d, e) -> b Source #

Deprecated: Use the tuple package instead.

Select the second component of a 5-element tuple.

sel5_3 :: (a, b, c, d, e) -> c Source #

Deprecated: Use the tuple package instead.

Select the third component of a 5-element tuple.

sel5_4 :: (a, b, c, d, e) -> d Source #

Deprecated: Use the tuple package instead.

Select the fourth component of a 5-element tuple.

sel5_5 :: (a, b, c, d, e) -> e Source #

Deprecated: Use the tuple package instead.

Select the fifth component of a 5-element tuple.

# Floating point utilities

fDiv :: RealFrac a => a -> a -> Integer infixl 7 Source #

Deprecated: These are not used by Yampa and will be removed.

Floating-point integer division.

fMod :: RealFrac a => a -> a -> a infixl 7 Source #

Deprecated: These are not used by Yampa and will be removed.

Floating-point modulo.

fDivMod :: RealFrac a => a -> a -> (Integer, a) Source #

Deprecated: These are not used by Yampa and will be removed.

Floating-point integer division and modulo.

# Liftings

arr4 :: Arrow a => (b -> c -> d -> e -> f) -> a (b, c, d, e) f Source #

Lift a 4-ary function onto an arrow

arr5 :: Arrow a => (b -> c -> d -> e -> f -> g) -> a (b, c, d, e, f) g Source #

Lift a 5-ary function onto an arrow

lift0 :: Arrow a => c -> a b c Source #

Lift an 0-ary function onto an arrow

If there was an `arr0`

function, this would be a synonym.

lift1 :: Arrow a => (c -> d) -> a b c -> a b d Source #

Lift a function into a function between arrows.

lift2 :: Arrow a => (c -> d -> e) -> a b c -> a b d -> a b e Source #

Lift a binary function into a function between arrows.

lift3 :: Arrow a => (c -> d -> e -> f) -> a b c -> a b d -> a b e -> a b f Source #

Lift a 3-ary function into a function between arrows.