definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

Algebra.Traversable

Contents

Synopsis

Documentation

class Functor t => Traversable t where Source #

Minimal complete definition

sequence

Methods

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

Instances

Traversable DeQue Source # 

Methods

sequence :: Applicative f => DeQue (f a) -> f (DeQue a) Source #

Traversable TimeVal Source # 

Methods

sequence :: Applicative f => TimeVal (f a) -> f (TimeVal a) Source #

Traversable w => Traversable (Cofree w) Source # 

Methods

sequence :: Applicative f => Cofree w (f a) -> f (Cofree w a) Source #

Traversable f => Traversable (Free f) Source # 

Methods

sequence :: Applicative f => Free f (f a) -> f (Free f a) Source #

Traversable m => Traversable (StrictT m) Source # 

Methods

sequence :: Applicative f => StrictT m (f a) -> f (StrictT m a) Source #

Traversable m => Traversable (MaybeT m) Source # 

Methods

sequence :: Applicative f => MaybeT m (f a) -> f (MaybeT m a) Source #

Traversable m => Traversable (TreeT m) Source # 

Methods

sequence :: Applicative f => TreeT m (f a) -> f (TreeT m a) Source #

Traversable m => Traversable (ListT m) Source # 

Methods

sequence :: Applicative f => ListT m (f a) -> f (ListT m a) Source #

(Monad m, Traversable m) => Traversable (LogicT m) Source # 

Methods

sequence :: Applicative f => LogicT m (f a) -> f (LogicT m a) Source #

(Traversable g, Traversable f) => Traversable (Compose' f g) Source # 

Methods

sequence :: Applicative f => Compose' f g (f a) -> f (Compose' f g a) Source #

Traversable m => Traversable (EitherT e m) Source # 

Methods

sequence :: Applicative f => EitherT e m (f a) -> f (EitherT e m a) Source #

Traversable m => Traversable (WriterT e m) Source # 

Methods

sequence :: Applicative f => WriterT e m (f a) -> f (WriterT e m a) Source #

Traversable (Queue push pop) Source # 

Methods

sequence :: Applicative f => Queue push pop (f a) -> f (Queue push pop a) Source #

Traversable m => Traversable (RWST Void w Void m) Source # 

Methods

sequence :: Applicative f => RWST Void w Void m (f a) -> f (RWST Void w Void m a) Source #

class Functor t => Contravariant t where Source #

Minimal complete definition

collect

Methods

collect :: Functor f => f (t a) -> t (f a) Source #

Instances

Contravariant Id Source # 

Methods

collect :: Functor f => f (Id a) -> Id (f a) Source #

Contravariant Strict Source # 

Methods

collect :: Functor f => f (Strict a) -> Strict (f a) Source #

Contravariant ((->) a) Source # 

Methods

collect :: Functor f => f (a -> a) -> a -> f a Source #

(Contravariant f, Contravariant g) => Contravariant ((:.:) f g) Source # 

Methods

collect :: Functor f => f ((f :.: g) a) -> (f :.: g) (f a) Source #

Contravariant f => Contravariant (Kleisli f a) Source # 

Methods

collect :: Functor f => f (Kleisli f a a) -> Kleisli f a (f a) Source #

traverse :: (Applicative f, Traversable t) => (a -> f b) -> t a -> f (t b) Source #

for :: (Applicative f, Traversable t) => t a -> (a -> f b) -> f (t b) Source #

transpose :: (Applicative f, Traversable t) => t (f a) -> f (t a) Source #

doTimes :: Applicative f => Int -> f a -> f [a] Source #

doTimes_ :: Applicative f => Int -> f a -> f () Source #

converted :: (Unit f, Unit g, Foldable f, Foldable g, Monoid (f a), Monoid (g b)) => Iso (f a) (f b) (g a) (g b) Source #

folded :: (Unit f', Foldable f, Monoid m) => Iso m m' (f m) (f' m') Source #

Instance utilities

coerceSequence :: forall f t' t a. (Applicative f, Traversable t) => (forall b. t b -> t' b) -> t' (f a) -> f (t' a) Source #

Orphan instances

Traversable [] Source # 

Methods

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

Traversable Maybe Source # 

Methods

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

Traversable Tree Source # 

Methods

sequence :: Applicative f => Tree (f a) -> f (Tree a) Source #

Traversable Interleave Source # 

Methods

sequence :: Applicative f => Interleave (f a) -> f (Interleave a) Source #

Traversable OrdList Source # 

Methods

sequence :: Applicative f => OrdList (f a) -> f (OrdList a) Source #

Traversable Id Source # 

Methods

sequence :: Applicative f => Id (f a) -> f (Id a) Source #

Traversable Strict Source # 

Methods

sequence :: Applicative f => Strict (f a) -> f (Strict a) Source #

Compound a b [a] [b] Source # 

Methods

each :: Traversal a b [a] [b] Source #

Traversable (Either a) Source # 

Methods

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

Traversable ((,) c) Source # 

Methods

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

Traversable (Assoc k) Source # 

Methods

sequence :: Applicative f => Assoc k (f a) -> f (Assoc k a) Source #

Traversable (Increasing k) Source # 

Methods

sequence :: Applicative f => Increasing k (f a) -> f (Increasing k a) Source #

Traversable f => Traversable (Zip f) Source # 

Methods

sequence :: Applicative f => Zip f (f a) -> f (Zip f a) Source #

(Traversable f, Traversable g) => Traversable ((:++:) f g) Source # 

Methods

sequence :: Applicative f => (f :++: g) (f a) -> f ((f :++: g) a) Source #

(Traversable f, Traversable g) => Traversable ((:**:) f g) Source # 

Methods

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

(Traversable f, Traversable g) => Traversable ((:.:) f g) Source # 

Methods

sequence :: Applicative f => (f :.: g) (f a) -> f ((f :.: g) a) Source #