camfort-0.902: 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 #

reduceCollect :: (Data s, Data t, Uniplate t, Biplate t s) => (s -> Maybe a) -> t -> [a] Source #

everywhere :: (Zipper a -> Zipper a) -> Zipper a -> Zipper a Source #

zfmap :: Data a => (a -> a) -> Zipper (d a) -> Zipper (d a) Source #

data Reverse f a Source #

Constructors

Reverse 

Fields

Instances

Functor (Reverse * Str) Source # 

Methods

fmap :: (a -> b) -> Reverse * Str a -> Reverse * Str b #

(<$) :: a -> Reverse * Str b -> Reverse * Str a #

Foldable (Reverse * Str) Source # 

Methods

fold :: Monoid m => Reverse * Str m -> m #

foldMap :: Monoid m => (a -> m) -> Reverse * Str a -> m #

foldr :: (a -> b -> b) -> b -> Reverse * Str a -> b #

foldr' :: (a -> b -> b) -> b -> Reverse * Str a -> b #

foldl :: (b -> a -> b) -> b -> Reverse * Str a -> b #

foldl' :: (b -> a -> b) -> b -> Reverse * Str a -> b #

foldr1 :: (a -> a -> a) -> Reverse * Str a -> a #

foldl1 :: (a -> a -> a) -> Reverse * Str a -> a #

toList :: Reverse * Str a -> [a] #

null :: Reverse * Str a -> Bool #

length :: Reverse * Str a -> Int #

elem :: Eq a => a -> Reverse * Str a -> Bool #

maximum :: Ord a => Reverse * Str a -> a #

minimum :: Ord a => Reverse * Str a -> a #

sum :: Num a => Reverse * Str a -> a #

product :: Num a => Reverse * Str a -> a #

Traversable (Reverse * Str) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Reverse * Str a -> f (Reverse * Str b) #

sequenceA :: Applicative f => Reverse * Str (f a) -> f (Reverse * Str a) #

mapM :: Monad m => (a -> m b) -> Reverse * Str a -> m (Reverse * Str b) #

sequence :: Monad m => Reverse * Str (m a) -> m (Reverse * Str a) #

descendReverseM :: (Data on, Monad m, Uniplate on) => (on -> m on) -> on -> m on Source #

descendBiReverseM :: (Data from, Data to, Monad m, Biplate from to) => (to -> m to) -> from -> m from Source #