Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | hpacheco@di.uminho.pt |

Pointless Haskell: point-free programming with recursion patterns as hylomorphisms

This module defines many standard combinators used for point-free programming.

- _L :: a
- data One
- bang :: a -> One
- pnt :: a -> One -> a
- (/\) :: (a -> b) -> (a -> c) -> a -> (b, c)
- (><) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d)
- inl :: a -> Either a b
- inr :: b -> Either a b
- (\/) :: (b -> a) -> (c -> a) -> Either b c -> a
- (-|-) :: (a -> b) -> (c -> d) -> Either a c -> Either b d
- (<>) :: (a -> b) -> (c -> d) -> Either a c -> Either b d
- app :: (a -> b, a) -> b
- lexp :: (a -> b) -> (b -> c) -> a -> c
- rexp :: (b -> c) -> (a -> b) -> a -> c
- (!) :: a -> b -> a
- grd :: (a -> Bool) -> a -> Either a a
- (?) :: (a -> Bool) -> a -> Either a a
- (??) :: (a -> Either One One) -> a -> Either a a
- split :: (a -> b, a -> c) -> a -> (b, c)
- eithr :: (a -> c, b -> c) -> Either a b -> c
- comp :: (b -> c, a -> b) -> a -> c
- orf :: (a -> Bool, a -> Bool) -> a -> Bool
- andf :: (a -> Bool, a -> Bool) -> a -> Bool
- or :: (Bool, Bool) -> Bool
- and :: (Bool, Bool) -> Bool
- eq :: Eq a => (a, a) -> Bool
- neq :: Eq a => (a, a) -> Bool
- swap :: (a, b) -> (b, a)
- coswap :: Either a b -> Either b a
- distl :: (Either a b, c) -> Either (a, c) (b, c)
- undistl :: Either (a, c) (b, c) -> (Either a b, c)
- distr :: (c, Either a b) -> Either (c, a) (c, b)
- undistr :: Either (c, a) (c, b) -> (c, Either a b)
- assocl :: (a, (b, c)) -> ((a, b), c)
- assocr :: ((a, b), c) -> (a, (b, c))
- coassocl :: Either a (Either b c) -> Either (Either a b) c
- coassocr :: Either (Either a b) c -> Either a (Either b c)
- subr :: (a, (b, c)) -> (b, (a, c))
- subl :: ((a, b), c) -> ((a, c), b)
- cosubr :: Either a (Either b c) -> Either b (Either a c)
- cosubl :: Either (Either a b) c -> Either (Either a c) b
- distp :: ((c, d), (a, b)) -> ((c, a), (d, b))
- dists :: (Either a b, Either c d) -> Either (Either (a, c) (a, d)) (Either (b, c) (b, d))

# Terminal object

# Points

# Products

# Sums

# Exponentials

# Guards

(?) :: (a -> Bool) -> a -> Either a aSource

Infix guard combinator that simulates the postfix syntax.

# Point-free definitions of uncurried versions of the basic combinators

# Point-free isomorphic combinators

coassocr :: Either (Either a b) c -> Either a (Either b c)Source

Associates nested sums to the right.

cosubr :: Either a (Either b c) -> Either b (Either a c)Source

Shifts an option to the right of a nested sum.