Generics.Deriving.Traversable

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

Safe Haskell | Safe
Language | Haskell2010

Generics.Deriving.Traversable

Contents

- Generic Traversable class
- Default method
- Internal Traversable class

Synopsis

- class (GFunctor t, GFoldable t) => GTraversable t where
- gtraversedefault :: (Generic1 t, GTraversable' (Rep1 t), Applicative f) => (a -> f b) -> t a -> f (t b)
- class GTraversable' t where

# Generic Traversable class

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

Methods

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

gtraverse :: (Generic1 t, GTraversable' (Rep1 t), 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) #

Instances

GTraversable [] # |
Methods gtraverse :: Applicative f => (a -> f b) -> [a] -> f [b] # gsequenceA :: Applicative f => [f a] -> f [a] # gmapM :: Monad m => (a -> m b) -> [a] -> m [b] # gsequence :: Monad m => [m a] -> m [a] #
GTraversable Maybe # |
Methods gtraverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) # gsequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) # gmapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) # gsequence :: Monad m => Maybe (m a) -> m (Maybe a) #
GTraversable Identity # |
Methods gtraverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) # gsequenceA :: Applicative f => Identity (f a) -> f (Identity a) # gmapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) # gsequence :: Monad m => Identity (m a) -> m (Identity a) #
GTraversable Min # |
Methods gtraverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) # gsequenceA :: Applicative f => Min (f a) -> f (Min a) # gmapM :: Monad m => (a -> m b) -> Min a -> m (Min b) # gsequence :: Monad m => Min (m a) -> m (Min a) #
GTraversable Max # |
Methods gtraverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) # gsequenceA :: Applicative f => Max (f a) -> f (Max a) # gmapM :: Monad m => (a -> m b) -> Max a -> m (Max b) # gsequence :: Monad m => Max (m a) -> m (Max a) #
GTraversable First # |
Methods gtraverse :: Applicative f => (a -> f b) -> First a -> f (First b) # gsequenceA :: Applicative f => First (f a) -> f (First a) # gmapM :: Monad m => (a -> m b) -> First a -> m (First b) # gsequence :: Monad m => First (m a) -> m (First a) #
GTraversable Last # |
Methods gtraverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) # gsequenceA :: Applicative f => Last (f a) -> f (Last a) # gmapM :: Monad m => (a -> m b) -> Last a -> m (Last b) # gsequence :: Monad m => Last (m a) -> m (Last a) #
GTraversable WrappedMonoid # |
Methods gtraverse :: Applicative f => (a -> f b) -> WrappedMonoid a -> f (WrappedMonoid b) # gsequenceA :: Applicative f => WrappedMonoid (f a) -> f (WrappedMonoid a) # gmapM :: Monad m => (a -> m b) -> WrappedMonoid a -> m (WrappedMonoid b) # gsequence :: Monad m => WrappedMonoid (m a) -> m (WrappedMonoid a) #
GTraversable Option # |
Methods gtraverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) # gsequenceA :: Applicative f => Option (f a) -> f (Option a) # gmapM :: Monad m => (a -> m b) -> Option a -> m (Option b) # gsequence :: Monad m => Option (m a) -> m (Option a) #
GTraversable NonEmpty # |
Methods gtraverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) # gsequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) # gmapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) # gsequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #
GTraversable Complex # |
Methods gtraverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) # gsequenceA :: Applicative f => Complex (f a) -> f (Complex a) # gmapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) # gsequence :: Monad m => Complex (m a) -> m (Complex a) #
GTraversable ZipList # |
Methods gtraverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) # gsequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) # gmapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) # gsequence :: Monad m => ZipList (m a) -> m (ZipList a) #
GTraversable Dual # |
Methods gtraverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) # gsequenceA :: Applicative f => Dual (f a) -> f (Dual a) # gmapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) # gsequence :: Monad m => Dual (m a) -> m (Dual a) #
GTraversable Sum # |
Methods gtraverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) # gsequenceA :: Applicative f => Sum (f a) -> f (Sum a) # gmapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) # gsequence :: Monad m => Sum (m a) -> m (Sum a) #
GTraversable Product # |
Methods gtraverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) # gsequenceA :: Applicative f => Product (f a) -> f (Product a) # gmapM :: Monad m => (a -> m b) -> Product a -> m (Product b) # gsequence :: Monad m => Product (m a) -> m (Product a) #
GTraversable First # |
Methods gtraverse :: Applicative f => (a -> f b) -> First a -> f (First b) # gsequenceA :: Applicative f => First (f a) -> f (First a) # gmapM :: Monad m => (a -> m b) -> First a -> m (First b) # gsequence :: Monad m => First (m a) -> m (First a) #
GTraversable Last # |
Methods gtraverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) # gsequenceA :: Applicative f => Last (f a) -> f (Last a) # gmapM :: Monad m => (a -> m b) -> Last a -> m (Last b) # gsequence :: Monad m => Last (m a) -> m (Last a) #
GTraversable (Either a) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Either a a -> f (Either a b) # gsequenceA :: Applicative f => Either a (f a) -> f (Either a a) # gmapM :: Monad m => (a -> m b) -> Either a a -> m (Either a b) # gsequence :: Monad m => Either a (m a) -> m (Either a a) #
GTraversable ((,) a) # |
Methods gtraverse :: Applicative f => (a -> f b) -> (a, a) -> f (a, b) # gsequenceA :: Applicative f => (a, f a) -> f (a, a) # gmapM :: Monad m => (a -> m b) -> (a, a) -> m (a, b) # gsequence :: Monad m => (a, m a) -> m (a, a) #
GTraversable (Arg a) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Arg a a -> f (Arg a b) # gsequenceA :: Applicative f => Arg a (f a) -> f (Arg a a) # gmapM :: Monad m => (a -> m b) -> Arg a a -> m (Arg a b) # gsequence :: Monad m => Arg a (m a) -> m (Arg a a) #
GTraversable (Proxy *) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Proxy * a -> f (Proxy * b) # gsequenceA :: Applicative f => Proxy * (f a) -> f (Proxy * a) # gmapM :: Monad m => (a -> m b) -> Proxy * a -> m (Proxy * b) # gsequence :: Monad m => Proxy * (m a) -> m (Proxy * a) #
GTraversable (Const * m) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Const * m a -> f (Const * m b) # gsequenceA :: Applicative f => Const * m (f a) -> f (Const * m a) # gmapM :: Monad m => (a -> m b) -> Const * m a -> m (Const * m b) # gsequence :: Monad m => Const * m (m a) -> m (Const * m a) #
(GTraversable f, GTraversable g) => GTraversable (Sum * f g) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Sum * f g a -> f (Sum * f g b) # gsequenceA :: Applicative f => Sum * f g (f a) -> f (Sum * f g a) # gmapM :: Monad m => (a -> m b) -> Sum * f g a -> m (Sum * f g b) # gsequence :: Monad m => Sum * f g (m a) -> m (Sum * f g a) #
(GTraversable f, GTraversable g) => GTraversable (Product * f g) # |
Methods gtraverse :: Applicative f => (a -> f b) -> Product * f g a -> f (Product * f g b) # gsequenceA :: Applicative f => Product * f g (f a) -> f (Product * f g a) # gmapM :: Monad m => (a -> m b) -> Product * f g a -> m (Product * f g b) # gsequence :: Monad m => Product * f g (m a) -> m (Product * f g a) #

# Default method

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

# Internal Traversable class

class GTraversable' t where #

Minimal complete definition

gtraverse'

Methods

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

Instances

GTraversable' U1 # |
Methods gtraverse' :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) #
GTraversable' Par1 # |
Methods gtraverse' :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) #
GTraversable' UAddr # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) #
GTraversable' UChar # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #
GTraversable' UDouble # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #
GTraversable' UFloat # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #
GTraversable' UInt # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #
GTraversable' UWord # |
Methods gtraverse' :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #
GTraversable f => GTraversable' (Rec1 f) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> Rec1 f a -> f (Rec1 f b) #
GTraversable' (K1 i c) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) #
(GTraversable' f, GTraversable' g) => GTraversable' ((:+:) f g) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> (f :+: g) a -> f ((f :+: g) b) #
(GTraversable' f, GTraversable' g) => GTraversable' ((:*:) f g) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> (f :*: g) a -> f ((f :*: g) b) #
(GTraversable f, GTraversable' g) => GTraversable' ((:.:) f g) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> (f :.: g) a -> f ((f :.: g) b) #
GTraversable' f => GTraversable' (M1 i c f) # |
Methods gtraverse' :: Applicative f => (a -> f b) -> M1 i c f a -> f (M1 i c f b) #