| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Functor.Utils
Documentation
class Functor f => Pure (f :: Type -> Type) where Source #
Like Applicative, but without *.
For any instance of both Applicative and Pure, it should hold
pure' = pure.
class Functor t => TraversableF (t :: Type -> Type) where Source #
A variant of Traversable with weaker constraints.
In particular, traverseF and sequenceF weaken the Applicative
constraint to a Functor constraint.
Among the type class constraints, the Functor constraint is obvious,
for fmap can be implemented using traverseF.
The Foldable constraint, however, which is present for
Traversable, is debatable, and was removed for
convenience.
It is debatable whether the class and function names are fitting.
Methods
traverseF :: Functor f => (a -> f b) -> t a -> f (t b) Source #
Like traverse, but with weaker constraints.
sequenceF :: Functor f => t (f a) -> f (t a) Source #
Like sequenceA, but with weaker constraints.
Instances
| TraversableF SectionFormatted Source # | |
Defined in Language.Lsd.AST.Type.Section Methods traverseF :: Functor f => (a -> f b) -> SectionFormatted a -> f (SectionFormatted b) Source # sequenceF :: Functor f => SectionFormatted (f a) -> f (SectionFormatted a) Source # | |
| TraversableF (Flagged flag) Source # | |
sequenceEither :: Pure f => Either e (f a) -> f (Either e a) Source #
Variant of sequenceA, like traverseEither is a
variant of traverse.