generic-deriving-1.4.0: Generic programming library for generalised deriving.

Safe Haskell | Safe-Inferred

Generics.Deriving.Traversable

Contents

- GTraversable class
- Default method

Synopsis

- class (GFunctor t, GFoldable t) => GTraversable t where
  - gtraverse :: Applicative f => (a -> f b) -> t a -> f (t b)
  - gsequenceA :: Applicative f => t (f a) -> f (t a)
  - gmapM :: Monad m => (a -> m b) -> t a -> m (t b)
  - gsequence :: Monad m => t (m a) -> m (t a)
- gtraversedefault :: (Generic1 t, GTraversable' (Rep1 t), Applicative f) => (a -> f b) -> t a -> f (t b)

# GTraversable class

class (GFunctor t, GFoldable t) => GTraversable t where Source

Methods

gtraverse :: Applicative f => (a -> f b) -> t a -> f (t b)Source

gsequenceA :: Applicative f => t (f a) -> f (t a)Source

gmapM :: Monad m => (a -> m b) -> t a -> m (t b)Source

gsequence :: Monad m => t (m a) -> m (t a)Source

Instances

GTraversable [] |
GTraversable Maybe |

# Default method

gtraversedefault :: (Generic1 t, GTraversable' (Rep1 t), Applicative f) => (a -> f b) -> t a -> f (t b)Source