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

Safe HaskellSafe
LanguageHaskell2010

Generics.Deriving.Traversable

Contents

Synopsis

Generic Traversable class

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

Methods

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

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

Methods

gtraverse :: Applicative f => (a -> f b) -> [a] -> f [b] Source #

gsequenceA :: Applicative f => [f a] -> f [a] Source #

gmapM :: Monad m => (a -> m b) -> [a] -> m [b] Source #

gsequence :: Monad m => [m a] -> m [a] Source #

GTraversable Maybe Source # 

Methods

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

gsequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source #

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

gsequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #

GTraversable Identity Source # 

Methods

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

gsequenceA :: Applicative f => Identity (f a) -> f (Identity a) Source #

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

gsequence :: Monad m => Identity (m a) -> m (Identity a) Source #

GTraversable Min Source # 

Methods

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

gsequenceA :: Applicative f => Min (f a) -> f (Min a) Source #

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

gsequence :: Monad m => Min (m a) -> m (Min a) Source #

GTraversable Max Source # 

Methods

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

gsequenceA :: Applicative f => Max (f a) -> f (Max a) Source #

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

gsequence :: Monad m => Max (m a) -> m (Max a) Source #

GTraversable First Source # 

Methods

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

gsequenceA :: Applicative f => First (f a) -> f (First a) Source #

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

gsequence :: Monad m => First (m a) -> m (First a) Source #

GTraversable Last Source # 

Methods

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

gsequenceA :: Applicative f => Last (f a) -> f (Last a) Source #

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

gsequence :: Monad m => Last (m a) -> m (Last a) Source #

GTraversable WrappedMonoid Source # 

Methods

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

gsequenceA :: Applicative f => WrappedMonoid (f a) -> f (WrappedMonoid a) Source #

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

gsequence :: Monad m => WrappedMonoid (m a) -> m (WrappedMonoid a) Source #

GTraversable Option Source # 

Methods

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

gsequenceA :: Applicative f => Option (f a) -> f (Option a) Source #

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

gsequence :: Monad m => Option (m a) -> m (Option a) Source #

GTraversable NonEmpty Source # 

Methods

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

gsequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) Source #

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

gsequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) Source #

GTraversable Complex Source # 

Methods

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

gsequenceA :: Applicative f => Complex (f a) -> f (Complex a) Source #

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

gsequence :: Monad m => Complex (m a) -> m (Complex a) Source #

GTraversable ZipList Source # 

Methods

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

gsequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) Source #

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

gsequence :: Monad m => ZipList (m a) -> m (ZipList a) Source #

GTraversable Dual Source # 

Methods

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

gsequenceA :: Applicative f => Dual (f a) -> f (Dual a) Source #

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

gsequence :: Monad m => Dual (m a) -> m (Dual a) Source #

GTraversable Sum Source # 

Methods

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

gsequenceA :: Applicative f => Sum (f a) -> f (Sum a) Source #

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

gsequence :: Monad m => Sum (m a) -> m (Sum a) Source #

GTraversable Product Source # 

Methods

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

gsequenceA :: Applicative f => Product (f a) -> f (Product a) Source #

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

gsequence :: Monad m => Product (m a) -> m (Product a) Source #

GTraversable First Source # 

Methods

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

gsequenceA :: Applicative f => First (f a) -> f (First a) Source #

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

gsequence :: Monad m => First (m a) -> m (First a) Source #

GTraversable Last Source # 

Methods

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

gsequenceA :: Applicative f => Last (f a) -> f (Last a) Source #

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

gsequence :: Monad m => Last (m a) -> m (Last a) Source #

GTraversable (Either a) Source # 

Methods

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

gsequenceA :: Applicative f => Either a (f a) -> f (Either a a) Source #

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

gsequence :: Monad m => Either a (m a) -> m (Either a a) Source #

GTraversable ((,) a) Source # 

Methods

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

gsequenceA :: Applicative f => (a, f a) -> f (a, a) Source #

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

gsequence :: Monad m => (a, m a) -> m (a, a) Source #

GTraversable (Arg a) Source # 

Methods

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

gsequenceA :: Applicative f => Arg a (f a) -> f (Arg a a) Source #

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

gsequence :: Monad m => Arg a (m a) -> m (Arg a a) Source #

GTraversable (Proxy *) Source # 

Methods

gtraverse :: Applicative f => (a -> f b) -> Proxy * a -> f (Proxy * b) Source #

gsequenceA :: Applicative f => Proxy * (f a) -> f (Proxy * a) Source #

gmapM :: Monad m => (a -> m b) -> Proxy * a -> m (Proxy * b) Source #

gsequence :: Monad m => Proxy * (m a) -> m (Proxy * a) Source #

GTraversable (Const * m) Source # 

Methods

gtraverse :: Applicative f => (a -> f b) -> Const * m a -> f (Const * m b) Source #

gsequenceA :: Applicative f => Const * m (f a) -> f (Const * m a) Source #

gmapM :: Monad m => (a -> m b) -> Const * m a -> m (Const * m b) Source #

gsequence :: Monad m => Const * m (m a) -> m (Const * m a) Source #

(GTraversable f, GTraversable g) => GTraversable (Sum * f g) Source # 

Methods

gtraverse :: Applicative f => (a -> f b) -> Sum * f g a -> f (Sum * f g b) Source #

gsequenceA :: Applicative f => Sum * f g (f a) -> f (Sum * f g a) Source #

gmapM :: Monad m => (a -> m b) -> Sum * f g a -> m (Sum * f g b) Source #

gsequence :: Monad m => Sum * f g (m a) -> m (Sum * f g a) Source #

(GTraversable f, GTraversable g) => GTraversable (Product * f g) Source # 

Methods

gtraverse :: Applicative f => (a -> f b) -> Product * f g a -> f (Product * f g b) Source #

gsequenceA :: Applicative f => Product * f g (f a) -> f (Product * f g a) Source #

gmapM :: Monad m => (a -> m b) -> Product * f g a -> m (Product * f g b) Source #

gsequence :: Monad m => Product * f g (m a) -> m (Product * f g a) Source #

Default method

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

Internal Traversable class

class GTraversable' t where Source #

Minimal complete definition

gtraverse'

Methods

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

Instances

GTraversable' U1 Source # 

Methods

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

GTraversable' Par1 Source # 

Methods

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

GTraversable' UAddr Source # 

Methods

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

GTraversable' UChar Source # 

Methods

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

GTraversable' UDouble Source # 

Methods

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

GTraversable' UFloat Source # 

Methods

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

GTraversable' UInt Source # 

Methods

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

GTraversable' UWord Source # 

Methods

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

GTraversable f => GTraversable' (Rec1 f) Source # 

Methods

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

GTraversable' (K1 i c) Source # 

Methods

gtraverse' :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) Source #

(GTraversable' f, GTraversable' g) => GTraversable' ((:+:) f g) Source # 

Methods

gtraverse' :: Applicative f => (a -> f b) -> (f :+: g) a -> f ((f :+: g) b) Source #

(GTraversable' f, GTraversable' g) => GTraversable' ((:*:) f g) Source # 

Methods

gtraverse' :: Applicative f => (a -> f b) -> (f :*: g) a -> f ((f :*: g) b) Source #

(GTraversable f, GTraversable' g) => GTraversable' ((:.:) f g) Source # 

Methods

gtraverse' :: Applicative f => (a -> f b) -> (f :.: g) a -> f ((f :.: g) b) Source #

GTraversable' f => GTraversable' (M1 i c f) Source # 

Methods

gtraverse' :: Applicative f => (a -> f b) -> M1 i c f a -> f (M1 i c f b) Source #