Copyright | (c) Galois Inc 2014-2015 |
---|---|
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Safe Haskell | Trustworthy |
Language | Haskell98 |
This module declares classes for working with structures that accept a single parametric type parameter.
- class FunctorF m where
- class FoldableF (t :: (k -> *) -> *) where
- class (FunctorF t, FoldableF t) => TraversableF t where
- traverseF_ :: (FoldableF t, Applicative f) => (forall s. e s -> f ()) -> t e -> f ()
- fmapFDefault :: TraversableF t => (forall s. e s -> f s) -> t e -> t f
- foldMapFDefault :: (TraversableF t, Monoid m) => (forall s. e s -> m) -> t e -> m
- allF :: FoldableF t => (forall tp. f tp -> Bool) -> t f -> Bool
- anyF :: FoldableF t => (forall tp. f tp -> Bool) -> t f -> Bool
Documentation
class FoldableF (t :: (k -> *) -> *) where Source #
This is a generalization of the Foldable
class to
structures over parameterized terms.
foldMapF :: Monoid m => (forall s. e s -> m) -> t e -> m Source #
Map each element of the structure to a monoid, and combine the results.
foldrF :: (forall s. e s -> b -> b) -> b -> t e -> b Source #
Right-associative fold of a structure.
foldlF :: (forall s. b -> e s -> b) -> b -> t e -> b Source #
Left-associative fold of a structure.
foldrF' :: (forall s. e s -> b -> b) -> b -> t e -> b Source #
Right-associative fold of a structure, but with strict application of the operator.
foldlF' :: (forall s. b -> e s -> b) -> b -> t e -> b Source #
Left-associative fold of a parameterized structure with a strict accumulator.
toListF :: (forall tp. f tp -> a) -> t f -> [a] Source #
Convert structure to list.
class (FunctorF t, FoldableF t) => TraversableF t where Source #
traverseF :: Applicative m => (forall s. e s -> m (f s)) -> t e -> m (t f) Source #
TraversableF k (Const (k -> *) x) Source # | |
TraversableF k (MapF k ktp) Source # | |
traverseF_ :: (FoldableF t, Applicative f) => (forall s. e s -> f ()) -> t e -> f () Source #
Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results.
fmapFDefault :: TraversableF t => (forall s. e s -> f s) -> t e -> t f Source #
foldMapFDefault :: (TraversableF t, Monoid m) => (forall s. e s -> m) -> t e -> m Source #