Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Type classes Functor
, Foldable
, and Traversable
that correspond to the standard type classes of the same
name. The rank2classes package provides the equivalent set
of classes for natural transformations. This module extends the functionality to unnatural transformations.
Synopsis
- class (Transformation t, Functor g) => Functor t g where
- class (Transformation t, Foldable g) => Foldable t g where
- class (Transformation t, Traversable g) => Traversable t g where
- fmap :: Functor t g => t -> g (Domain t) -> g (Codomain t)
Documentation
class (Transformation t, Functor g) => Functor t g where Source #
Like Rank2.Functor
except it takes a Transformation
instead of a polymorphic function
class (Transformation t, Foldable g) => Foldable t g where Source #
Like Rank2.Foldable
except it takes a Transformation
instead of a polymorphic function
class (Transformation t, Traversable g) => Traversable t g where Source #
Like Rank2.Traversable
except it takes a Transformation
instead of a polymorphic function
Instances
(Traversable t g, Traversable t h, Codomain t ~ Compose m f, Applicative m) => Traversable t (Product g h) Source # | |