| hoogle | Source code | Contents | Index

General.Util

Synopsis

fix :: Eq a => (a -> a) -> a -> a
mapMaybeAll :: (a -> Maybe b) -> [a] -> Maybe [b]
concatMapMaybeAll :: (a -> Maybe [b]) -> [a] -> Maybe [b]
selection :: Int -> [a] -> [[a]]
permute :: [a] -> [[a]]
catLefts :: [Either a b] -> [a]
iff :: Bool -> a -> Maybe a
setEq :: Eq a => [a] -> [a] -> Bool
elemEnum :: Enum a => a -> [a] -> Bool

data FileType

= File
| Directory
| NotFound

fileType :: FilePath -> IO FileType
groupFsts :: Eq k => [(k, v)] -> [(k, [v])]
nubIntOn :: (v -> Int) -> [v] -> [v]
fold :: a -> (a -> a -> a) -> [a] -> a
fold1 :: (a -> a -> a) -> [a] -> a
halves :: [a] -> ([a], [a])
merge :: Ord a => [a] -> [a] -> [a]
mergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]
merges :: Ord a => [[a]] -> [a]
mergesBy :: (a -> a -> Ordering) -> [[a]] -> [a]
unzipEithers :: [Either a b] -> ([a], [b])
dropEnd :: (a -> Bool) -> [a] -> [a]
dropEnds :: (a -> Bool) -> [a] -> [a]
initLast :: [a] -> ([a], a)
(!!+) :: [a] -> (Int, a) -> [a]
disjoint :: Eq a => [a] -> Bool
exitMessage :: [String] -> IO a
split :: Eq a => a -> [a] -> [[a]]
traceM :: Monad m => String -> m ()
traceShow :: Show s => s -> a -> a
fromListMany :: Ord k => [(k, v)] -> Map k [v]
consNub :: Eq a => a -> [a] -> [a]
showLines :: Show a => [a] -> String
traceInline :: String -> a -> a
errorLines :: [String] -> b
splitAtLength :: Int -> [a] -> (Int, [a], [a])

Documentation

fix :: Eq a => (a -> a) -> a -> a | Source

mapMaybeAll :: (a -> Maybe b) -> [a] -> Maybe [b] | Source

If anyone of them returns Nothing, the whole thing does

concatMapMaybeAll :: (a -> Maybe [b]) -> [a] -> Maybe [b] | Source

selection :: Int -> [a] -> [[a]] | Source

pick all subsets (maintaining order) with a length of n n must be greater or equal to the length of the list passed in

permute :: [a] -> [[a]] | Source

all permutations of a list

catLefts :: [Either a b] -> [a] | Source

iff :: Bool -> a -> Maybe a | Source

setEq :: Eq a => [a] -> [a] -> Bool | Source

elemEnum :: Enum a => a -> [a] -> Bool | Source

data FileType | Source

Constructors

File |
Directory |
NotFound |

Instances

Eq FileType
Show FileType

fileType :: FilePath -> IO FileType | Source

groupFsts :: Eq k => [(k, v)] -> [(k, [v])] | Source

nubIntOn :: (v -> Int) -> [v] -> [v] | Source

fold :: a -> (a -> a -> a) -> [a] -> a | Source

fold1 :: (a -> a -> a) -> [a] -> a | Source

halves :: [a] -> ([a], [a]) | Source

merge :: Ord a => [a] -> [a] -> [a] | Source

mergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] | Source

merges :: Ord a => [[a]] -> [a] | Source

mergesBy :: (a -> a -> Ordering) -> [[a]] -> [a] | Source

unzipEithers :: [Either a b] -> ([a], [b]) | Source

dropEnd :: (a -> Bool) -> [a] -> [a] | Source

dropEnds :: (a -> Bool) -> [a] -> [a] | Source

initLast :: [a] -> ([a], a) | Source

(!!+) :: [a] -> (Int, a) -> [a] | Source

disjoint :: Eq a => [a] -> Bool | Source

exitMessage :: [String] -> IO a | Source

split :: Eq a => a -> [a] -> [[a]] | Source

traceM :: Monad m => String -> m () | Source

traceShow :: Show s => s -> a -> a | Source

fromListMany :: Ord k => [(k, v)] -> Map k [v] | Source

consNub :: Eq a => a -> [a] -> [a] | Source

showLines :: Show a => [a] -> String | Source

traceInline :: String -> a -> a | Source

errorLines :: [String] -> b | Source

splitAtLength :: Int -> [a] -> (Int, [a], [a]) | Source

Like splitAt, but also return the number of items that were split. For performance.
Produced by Haddock version 2.4.2