Copyright | (c) 2017 Rudy Matela |
---|---|

License | 3-Clause BSD (see the file LICENSE) |

Maintainer | Rudy Matela <rudy@matela.com.br> |

Safe Haskell | Safe |

Language | Haskell2010 |

This module is part of Extrapolate, a library for generalization of counter-examples.

Miscellaneous utility functions.

This is not intended to be used by users of Extrapolate, only by modules of Extrapolate itself. Expect symbols exported here to come and go with every minor version.

- (+++) :: Ord a => [a] -> [a] -> [a]
- nubMerge :: Ord a => [a] -> [a] -> [a]
- nubMergeOn :: Ord b => (a -> b) -> [a] -> [a] -> [a]
- nubMergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]
- foldr0 :: (a -> a -> a) -> a -> [a] -> a
- fromLeft :: Either a b -> a
- fromRight :: Either a b -> b
- elemBy :: (a -> a -> Bool) -> a -> [a] -> Bool
- listEq :: (a -> a -> Bool) -> [a] -> [a] -> Bool
- listOrd :: (a -> a -> Bool) -> [a] -> [a] -> Bool
- maybeEq :: (a -> a -> Bool) -> Maybe a -> Maybe a -> Bool
- maybeOrd :: (a -> a -> Bool) -> Maybe a -> Maybe a -> Bool
- eitherEq :: (a -> a -> Bool) -> (b -> b -> Bool) -> Either a b -> Either a b -> Bool
- eitherOrd :: (a -> a -> Bool) -> (b -> b -> Bool) -> Either a b -> Either a b -> Bool
- pairEq :: (a -> a -> Bool) -> (b -> b -> Bool) -> (a, b) -> (a, b) -> Bool
- pairOrd :: (a -> a -> Bool) -> (b -> b -> Bool) -> (a, b) -> (a, b) -> Bool
- tripleEq :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (a, b, c) -> (a, b, c) -> Bool
- tripleOrd :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (a, b, c) -> (a, b, c) -> Bool
- quadrupleEq :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (d -> d -> Bool) -> (a, b, c, d) -> (a, b, c, d) -> Bool
- quadrupleOrd :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (d -> d -> Bool) -> (a, b, c, d) -> (a, b, c, d) -> Bool
- minimumOn :: Ord b => (a -> b) -> [a] -> a
- maximumOn :: Ord b => (a -> b) -> [a] -> a
- takeBound :: Maybe Int -> [a] -> [a]
- nubMergeMap :: Ord b => (a -> [b]) -> [a] -> [b]
- typesIn :: TypeRep -> [TypeRep]
- argumentTy :: TypeRep -> TypeRep
- resultTy :: TypeRep -> TypeRep
- discard :: (a -> Bool) -> [a] -> [a]
- compareIndex :: Eq a => [a] -> a -> a -> Ordering
- (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d

# Documentation

nubMergeOn :: Ord b => (a -> b) -> [a] -> [a] -> [a] Source #

nubMergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] Source #

tripleEq :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (a, b, c) -> (a, b, c) -> Bool Source #

tripleOrd :: (a -> a -> Bool) -> (b -> b -> Bool) -> (c -> c -> Bool) -> (a, b, c) -> (a, b, c) -> Bool Source #

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

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

nubMergeMap :: Ord b => (a -> [b]) -> [a] -> [b] Source #

typesIn :: TypeRep -> [TypeRep] Source #

For a given type, return all *-kinded types. (all non-function types)

typesIn (typeOf (undefined :: (Int -> Int) -> Int -> Bool)) == [Bool,Int]

argumentTy :: TypeRep -> TypeRep Source #

compareIndex :: Eq a => [a] -> a -> a -> Ordering Source #