tip-lib-0.1.2: tons of inductive problems - support library and tools

Safe HaskellSafe-Inferred
LanguageHaskell2010

Tip.Utils

Description

Handy utilities

Synopsis

Documentation

usort :: Ord a => [a] -> [a] Source

Sort and remove duplicates

sortThings :: Ord name => (thing -> name) -> (thing -> [name]) -> [thing] -> [[thing]] Source

Sort things in topologically in strongly connected components

flagify :: String -> String Source

Makes a nice flag from a constructor string

> flagify "PrintPolyFOL"
"print-poly-fol"

flagifyShow :: Show a => a -> String Source

Makes a flag from something Show-able

maximumOn :: forall f a b. (Foldable f, Ord b) => (a -> b) -> f a -> b Source

Calculates the maximum value of a foldable value.

Useful to find the highest unique in a structure