camfort-0.804: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell2010

Camfort.Helpers

Synopsis

Documentation

collect :: (Eq a, Ord k) => [(k, a)] -> Map k [a] Source #

checkDir :: [Char] -> IO () Source #

Creates a directory (from a filename string) if it doesn't exist

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

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

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

lookups :: Eq a => a -> [(a, b)] -> [b] Source #

lookups' :: Eq a => a -> [((a, b), c)] -> [(b, c)] Source #

pairs :: [a] -> [(a, a)] Source #

Computes all pairwise combinations

mfmap :: Functor f => (a -> b) -> [f a] -> [f b] Source #

Functor composed with list functor

each :: [a] -> (a -> b) -> [b] Source #

An infix map operation.

cmpEq :: Ordering -> Bool Source #

Is the Ordering an EQ?

cmpFst :: (a -> a -> Ordering) -> (a, b) -> (a, b) -> Ordering Source #

cmpSnd :: (b -> b -> Ordering) -> (a, b) -> (a, b) -> Ordering Source #

type (:?) a b = a Source #

used for type-level annotations giving documentation

foldPair :: (a -> a -> Maybe a) -> [a] -> [a] Source #

class PartialMonoid x where Source #

Minimal complete definition

emptyM, appendM

Methods

emptyM :: x Source #

appendM :: x -> x -> Maybe x Source #

normalise :: (Ord t, PartialMonoid t) => [t] -> [t] Source #

normaliseNoSort :: (Ord t, PartialMonoid t) => [t] -> [t] Source #

normaliseBy :: Ord t => (t -> t -> Maybe t) -> [t] -> [t] Source #