planet-mitchell-0.1.0: Planet Mitchell

Traversable

Synopsis

# Traversable

class (Functor t, Foldable t) => Traversable (t :: * -> *) where #

Functors representing data structures that can be traversed from left to right.

A definition of traverse must satisfy the following laws:

naturality
t . traverse f = traverse (t . f) for every applicative transformation t
identity
traverse Identity = Identity
composition
traverse (Compose . fmap g . f) = Compose . fmap (traverse g) . traverse f

A definition of sequenceA must satisfy the following laws:

naturality
t . sequenceA = sequenceA . fmap t for every applicative transformation t
identity
sequenceA . fmap Identity = Identity
composition
sequenceA . fmap Compose = Compose . fmap sequenceA . sequenceA

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations, i.e.

• t (pure x) = pure x
• t (x <*> y) = t x <*> t y

and the identity functor Identity and composition of functors Compose are defined as

  newtype Identity a = Identity a

instance Functor Identity where
fmap f (Identity x) = Identity (f x)

instance Applicative Identity where
pure x = Identity x
Identity f <*> Identity x = Identity (f x)

newtype Compose f g a = Compose (f (g a))

instance (Functor f, Functor g) => Functor (Compose f g) where
fmap f (Compose x) = Compose (fmap (fmap f) x)

instance (Applicative f, Applicative g) => Applicative (Compose f g) where
pure x = Compose (pure (pure x))
Compose f <*> Compose x = Compose ((<*>) <$> f <*> x) (The naturality law is implied by parametricity.) Instances are similar to Functor, e.g. given a data type data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a) a suitable instance would be instance Traversable Tree where traverse f Empty = pure Empty traverse f (Leaf x) = Leaf <$> f x
traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r This is suitable even for abstract types, as the laws for <*> imply a form of associativity. The superclass instances should satisfy the following: • In the Functor instance, fmap should be equivalent to traversal with the identity applicative functor (fmapDefault). • In the Foldable instance, foldMap should be equivalent to traversal with a constant applicative functor (foldMapDefault). Minimal complete definition Methods traverse :: Applicative f => (a -> f b) -> t a -> f (t b) # Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_. sequenceA :: Applicative f => t (f a) -> f (t a) # Evaluate each action in the structure from left to right, and and collect the results. For a version that ignores the results see sequenceA_. Instances  Since: base-2.1 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> [a] -> f [b] #sequenceA :: Applicative f => [f a] -> f [a] #mapM :: Monad m => (a -> m b) -> [a] -> m [b] #sequence :: Monad m => [m a] -> m [a] # Since: base-2.1 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #sequence :: Monad m => Maybe (m a) -> m (Maybe a) # Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) #sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) #mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) #sequence :: Monad m => Par1 (m a) -> m (Par1 a) # Instance detailsDefined in Data.Aeson.Types.Internal Methodstraverse :: Applicative f => (a -> f b) -> IResult a -> f (IResult b) #sequenceA :: Applicative f => IResult (f a) -> f (IResult a) #mapM :: Monad m => (a -> m b) -> IResult a -> m (IResult b) #sequence :: Monad m => IResult (m a) -> m (IResult a) # Instance detailsDefined in Data.Aeson.Types.Internal Methodstraverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) #sequenceA :: Applicative f => Result (f a) -> f (Result a) #mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) #sequence :: Monad m => Result (m a) -> m (Result a) # Instance detailsDefined in Data.Approximate.Type Methodstraverse :: Applicative f => (a -> f b) -> Approximate a -> f (Approximate b) #sequenceA :: Applicative f => Approximate (f a) -> f (Approximate a) #mapM :: Monad m => (a -> m b) -> Approximate a -> m (Approximate b) #sequence :: Monad m => Approximate (m a) -> m (Approximate a) # Instance detailsDefined in Data.Complex Methodstraverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #sequence :: Monad m => Complex (m a) -> m (Complex a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) #sequenceA :: Applicative f => Min (f a) -> f (Min a) #mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) #sequence :: Monad m => Min (m a) -> m (Min a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #sequenceA :: Applicative f => Max (f a) -> f (Max a) #mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #sequence :: Monad m => Max (m a) -> m (Max a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a -> f b) -> First a -> f (First b) #sequenceA :: Applicative f => First (f a) -> f (First a) #mapM :: Monad m => (a -> m b) -> First a -> m (First b) #sequence :: Monad m => First (m a) -> m (First a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #sequenceA :: Applicative f => Last (f a) -> f (Last a) #mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #sequence :: Monad m => Last (m a) -> m (Last a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) #sequenceA :: Applicative f => Option (f a) -> f (Option a) #mapM :: Monad m => (a -> m b) -> Option a -> m (Option b) #sequence :: Monad m => Option (m a) -> m (Option a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #sequence :: Monad m => ZipList (m a) -> m (ZipList a) # Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #sequence :: Monad m => Identity (m a) -> m (Identity a) # Since: base-4.8.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> First a -> f (First b) #sequenceA :: Applicative f => First (f a) -> f (First a) #mapM :: Monad m => (a -> m b) -> First a -> m (First b) #sequence :: Monad m => First (m a) -> m (First a) # Since: base-4.8.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #sequenceA :: Applicative f => Last (f a) -> f (Last a) #mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #sequence :: Monad m => Last (m a) -> m (Last a) # Since: base-4.8.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) #sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) #sequence :: Monad m => Dual (m a) -> m (Dual a) # Since: base-4.8.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #sequence :: Monad m => Sum (m a) -> m (Sum a) # Since: base-4.8.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) #sequenceA :: Applicative f => Product (f a) -> f (Product a) #mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) #sequence :: Monad m => Product (m a) -> m (Product a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) #mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) #sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) # Instance detailsDefined in Data.IntMap.Internal Methodstraverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) #sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) #sequence :: Monad m => IntMap (m a) -> m (IntMap a) # Since: containers-0.5.9 Instance detailsDefined in Data.Graph Methodstraverse :: Applicative f => (a -> f b) -> SCC a -> f (SCC b) #sequenceA :: Applicative f => SCC (f a) -> f (SCC a) #mapM :: Monad m => (a -> m b) -> SCC a -> m (SCC b) #sequence :: Monad m => SCC (m a) -> m (SCC a) # Instance detailsDefined in Data.Tree Methodstraverse :: Applicative f => (a -> f b) -> Tree a -> f (Tree b) #sequenceA :: Applicative f => Tree (f a) -> f (Tree a) #mapM :: Monad m => (a -> m b) -> Tree a -> m (Tree b) #sequence :: Monad m => Tree (m a) -> m (Tree a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #sequence :: Monad m => Seq (m a) -> m (Seq a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> FingerTree a -> f (FingerTree b) #sequenceA :: Applicative f => FingerTree (f a) -> f (FingerTree a) #mapM :: Monad m => (a -> m b) -> FingerTree a -> m (FingerTree b) #sequence :: Monad m => FingerTree (m a) -> m (FingerTree a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> Digit a -> f (Digit b) #sequenceA :: Applicative f => Digit (f a) -> f (Digit a) #mapM :: Monad m => (a -> m b) -> Digit a -> m (Digit b) #sequence :: Monad m => Digit (m a) -> m (Digit a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> Node a -> f (Node b) #sequenceA :: Applicative f => Node (f a) -> f (Node a) #mapM :: Monad m => (a -> m b) -> Node a -> m (Node b) #sequence :: Monad m => Node (m a) -> m (Node a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> Elem a -> f (Elem b) #sequenceA :: Applicative f => Elem (f a) -> f (Elem a) #mapM :: Monad m => (a -> m b) -> Elem a -> m (Elem b) #sequence :: Monad m => Elem (m a) -> m (Elem a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> ViewL a -> f (ViewL b) #sequenceA :: Applicative f => ViewL (f a) -> f (ViewL a) #mapM :: Monad m => (a -> m b) -> ViewL a -> m (ViewL b) #sequence :: Monad m => ViewL (m a) -> m (ViewL a) # Instance detailsDefined in Data.Sequence.Internal Methodstraverse :: Applicative f => (a -> f b) -> ViewR a -> f (ViewR b) #sequenceA :: Applicative f => ViewR (f a) -> f (ViewR a) #mapM :: Monad m => (a -> m b) -> ViewR a -> m (ViewR b) #sequence :: Monad m => ViewR (m a) -> m (ViewR a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ModuleName a -> f (ModuleName b) #sequenceA :: Applicative f => ModuleName (f a) -> f (ModuleName a) #mapM :: Monad m => (a -> m b) -> ModuleName a -> m (ModuleName b) #sequence :: Monad m => ModuleName (m a) -> m (ModuleName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> SpecialCon a -> f (SpecialCon b) #sequenceA :: Applicative f => SpecialCon (f a) -> f (SpecialCon a) #mapM :: Monad m => (a -> m b) -> SpecialCon a -> m (SpecialCon b) #sequence :: Monad m => SpecialCon (m a) -> m (SpecialCon a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> QName a -> f (QName b) #sequenceA :: Applicative f => QName (f a) -> f (QName a) #mapM :: Monad m => (a -> m b) -> QName a -> m (QName b) #sequence :: Monad m => QName (m a) -> m (QName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Name a -> f (Name b) #sequenceA :: Applicative f => Name (f a) -> f (Name a) #mapM :: Monad m => (a -> m b) -> Name a -> m (Name b) #sequence :: Monad m => Name (m a) -> m (Name a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> IPName a -> f (IPName b) #sequenceA :: Applicative f => IPName (f a) -> f (IPName a) #mapM :: Monad m => (a -> m b) -> IPName a -> m (IPName b) #sequence :: Monad m => IPName (m a) -> m (IPName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> QOp a -> f (QOp b) #sequenceA :: Applicative f => QOp (f a) -> f (QOp a) #mapM :: Monad m => (a -> m b) -> QOp a -> m (QOp b) #sequence :: Monad m => QOp (m a) -> m (QOp a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Op a -> f (Op b) #sequenceA :: Applicative f => Op (f a) -> f (Op a) #mapM :: Monad m => (a -> m b) -> Op a -> m (Op b) #sequence :: Monad m => Op (m a) -> m (Op a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> CName a -> f (CName b) #sequenceA :: Applicative f => CName (f a) -> f (CName a) #mapM :: Monad m => (a -> m b) -> CName a -> m (CName b) #sequence :: Monad m => CName (m a) -> m (CName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Module a -> f (Module b) #sequenceA :: Applicative f => Module (f a) -> f (Module a) #mapM :: Monad m => (a -> m b) -> Module a -> m (Module b) #sequence :: Monad m => Module (m a) -> m (Module a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ModuleHead a -> f (ModuleHead b) #sequenceA :: Applicative f => ModuleHead (f a) -> f (ModuleHead a) #mapM :: Monad m => (a -> m b) -> ModuleHead a -> m (ModuleHead b) #sequence :: Monad m => ModuleHead (m a) -> m (ModuleHead a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ExportSpecList a -> f (ExportSpecList b) #sequenceA :: Applicative f => ExportSpecList (f a) -> f (ExportSpecList a) #mapM :: Monad m => (a -> m b) -> ExportSpecList a -> m (ExportSpecList b) #sequence :: Monad m => ExportSpecList (m a) -> m (ExportSpecList a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ExportSpec a -> f (ExportSpec b) #sequenceA :: Applicative f => ExportSpec (f a) -> f (ExportSpec a) #mapM :: Monad m => (a -> m b) -> ExportSpec a -> m (ExportSpec b) #sequence :: Monad m => ExportSpec (m a) -> m (ExportSpec a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> EWildcard a -> f (EWildcard b) #sequenceA :: Applicative f => EWildcard (f a) -> f (EWildcard a) #mapM :: Monad m => (a -> m b) -> EWildcard a -> m (EWildcard b) #sequence :: Monad m => EWildcard (m a) -> m (EWildcard a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Namespace a -> f (Namespace b) #sequenceA :: Applicative f => Namespace (f a) -> f (Namespace a) #mapM :: Monad m => (a -> m b) -> Namespace a -> m (Namespace b) #sequence :: Monad m => Namespace (m a) -> m (Namespace a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ImportDecl a -> f (ImportDecl b) #sequenceA :: Applicative f => ImportDecl (f a) -> f (ImportDecl a) #mapM :: Monad m => (a -> m b) -> ImportDecl a -> m (ImportDecl b) #sequence :: Monad m => ImportDecl (m a) -> m (ImportDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ImportSpecList a -> f (ImportSpecList b) #sequenceA :: Applicative f => ImportSpecList (f a) -> f (ImportSpecList a) #mapM :: Monad m => (a -> m b) -> ImportSpecList a -> m (ImportSpecList b) #sequence :: Monad m => ImportSpecList (m a) -> m (ImportSpecList a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ImportSpec a -> f (ImportSpec b) #sequenceA :: Applicative f => ImportSpec (f a) -> f (ImportSpec a) #mapM :: Monad m => (a -> m b) -> ImportSpec a -> m (ImportSpec b) #sequence :: Monad m => ImportSpec (m a) -> m (ImportSpec a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Assoc a -> f (Assoc b) #sequenceA :: Applicative f => Assoc (f a) -> f (Assoc a) #mapM :: Monad m => (a -> m b) -> Assoc a -> m (Assoc b) #sequence :: Monad m => Assoc (m a) -> m (Assoc a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Decl a -> f (Decl b) #sequenceA :: Applicative f => Decl (f a) -> f (Decl a) #mapM :: Monad m => (a -> m b) -> Decl a -> m (Decl b) #sequence :: Monad m => Decl (m a) -> m (Decl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> PatternSynDirection a -> f (PatternSynDirection b) #sequenceA :: Applicative f => PatternSynDirection (f a) -> f (PatternSynDirection a) #mapM :: Monad m => (a -> m b) -> PatternSynDirection a -> m (PatternSynDirection b) #sequence :: Monad m => PatternSynDirection (m a) -> m (PatternSynDirection a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> TypeEqn a -> f (TypeEqn b) #sequenceA :: Applicative f => TypeEqn (f a) -> f (TypeEqn a) #mapM :: Monad m => (a -> m b) -> TypeEqn a -> m (TypeEqn b) #sequence :: Monad m => TypeEqn (m a) -> m (TypeEqn a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Annotation a -> f (Annotation b) #sequenceA :: Applicative f => Annotation (f a) -> f (Annotation a) #mapM :: Monad m => (a -> m b) -> Annotation a -> m (Annotation b) #sequence :: Monad m => Annotation (m a) -> m (Annotation a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> BooleanFormula a -> f (BooleanFormula b) #sequenceA :: Applicative f => BooleanFormula (f a) -> f (BooleanFormula a) #mapM :: Monad m => (a -> m b) -> BooleanFormula a -> m (BooleanFormula b) #sequence :: Monad m => BooleanFormula (m a) -> m (BooleanFormula a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Role a -> f (Role b) #sequenceA :: Applicative f => Role (f a) -> f (Role a) #mapM :: Monad m => (a -> m b) -> Role a -> m (Role b) #sequence :: Monad m => Role (m a) -> m (Role a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> DataOrNew a -> f (DataOrNew b) #sequenceA :: Applicative f => DataOrNew (f a) -> f (DataOrNew a) #mapM :: Monad m => (a -> m b) -> DataOrNew a -> m (DataOrNew b) #sequence :: Monad m => DataOrNew (m a) -> m (DataOrNew a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> InjectivityInfo a -> f (InjectivityInfo b) #sequenceA :: Applicative f => InjectivityInfo (f a) -> f (InjectivityInfo a) #mapM :: Monad m => (a -> m b) -> InjectivityInfo a -> m (InjectivityInfo b) #sequence :: Monad m => InjectivityInfo (m a) -> m (InjectivityInfo a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ResultSig a -> f (ResultSig b) #sequenceA :: Applicative f => ResultSig (f a) -> f (ResultSig a) #mapM :: Monad m => (a -> m b) -> ResultSig a -> m (ResultSig b) #sequence :: Monad m => ResultSig (m a) -> m (ResultSig a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> DeclHead a -> f (DeclHead b) #sequenceA :: Applicative f => DeclHead (f a) -> f (DeclHead a) #mapM :: Monad m => (a -> m b) -> DeclHead a -> m (DeclHead b) #sequence :: Monad m => DeclHead (m a) -> m (DeclHead a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> InstRule a -> f (InstRule b) #sequenceA :: Applicative f => InstRule (f a) -> f (InstRule a) #mapM :: Monad m => (a -> m b) -> InstRule a -> m (InstRule b) #sequence :: Monad m => InstRule (m a) -> m (InstRule a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> InstHead a -> f (InstHead b) #sequenceA :: Applicative f => InstHead (f a) -> f (InstHead a) #mapM :: Monad m => (a -> m b) -> InstHead a -> m (InstHead b) #sequence :: Monad m => InstHead (m a) -> m (InstHead a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Deriving a -> f (Deriving b) #sequenceA :: Applicative f => Deriving (f a) -> f (Deriving a) #mapM :: Monad m => (a -> m b) -> Deriving a -> m (Deriving b) #sequence :: Monad m => Deriving (m a) -> m (Deriving a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> DerivStrategy a -> f (DerivStrategy b) #sequenceA :: Applicative f => DerivStrategy (f a) -> f (DerivStrategy a) #mapM :: Monad m => (a -> m b) -> DerivStrategy a -> m (DerivStrategy b) #sequence :: Monad m => DerivStrategy (m a) -> m (DerivStrategy a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Binds a -> f (Binds b) #sequenceA :: Applicative f => Binds (f a) -> f (Binds a) #mapM :: Monad m => (a -> m b) -> Binds a -> m (Binds b) #sequence :: Monad m => Binds (m a) -> m (Binds a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> IPBind a -> f (IPBind b) #sequenceA :: Applicative f => IPBind (f a) -> f (IPBind a) #mapM :: Monad m => (a -> m b) -> IPBind a -> m (IPBind b) #sequence :: Monad m => IPBind (m a) -> m (IPBind a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Match a -> f (Match b) #sequenceA :: Applicative f => Match (f a) -> f (Match a) #mapM :: Monad m => (a -> m b) -> Match a -> m (Match b) #sequence :: Monad m => Match (m a) -> m (Match a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> QualConDecl a -> f (QualConDecl b) #sequenceA :: Applicative f => QualConDecl (f a) -> f (QualConDecl a) #mapM :: Monad m => (a -> m b) -> QualConDecl a -> m (QualConDecl b) #sequence :: Monad m => QualConDecl (m a) -> m (QualConDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ConDecl a -> f (ConDecl b) #sequenceA :: Applicative f => ConDecl (f a) -> f (ConDecl a) #mapM :: Monad m => (a -> m b) -> ConDecl a -> m (ConDecl b) #sequence :: Monad m => ConDecl (m a) -> m (ConDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> FieldDecl a -> f (FieldDecl b) #sequenceA :: Applicative f => FieldDecl (f a) -> f (FieldDecl a) #mapM :: Monad m => (a -> m b) -> FieldDecl a -> m (FieldDecl b) #sequence :: Monad m => FieldDecl (m a) -> m (FieldDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> GadtDecl a -> f (GadtDecl b) #sequenceA :: Applicative f => GadtDecl (f a) -> f (GadtDecl a) #mapM :: Monad m => (a -> m b) -> GadtDecl a -> m (GadtDecl b) #sequence :: Monad m => GadtDecl (m a) -> m (GadtDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ClassDecl a -> f (ClassDecl b) #sequenceA :: Applicative f => ClassDecl (f a) -> f (ClassDecl a) #mapM :: Monad m => (a -> m b) -> ClassDecl a -> m (ClassDecl b) #sequence :: Monad m => ClassDecl (m a) -> m (ClassDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> InstDecl a -> f (InstDecl b) #sequenceA :: Applicative f => InstDecl (f a) -> f (InstDecl a) #mapM :: Monad m => (a -> m b) -> InstDecl a -> m (InstDecl b) #sequence :: Monad m => InstDecl (m a) -> m (InstDecl a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> BangType a -> f (BangType b) #sequenceA :: Applicative f => BangType (f a) -> f (BangType a) #mapM :: Monad m => (a -> m b) -> BangType a -> m (BangType b) #sequence :: Monad m => BangType (m a) -> m (BangType a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Unpackedness a -> f (Unpackedness b) #sequenceA :: Applicative f => Unpackedness (f a) -> f (Unpackedness a) #mapM :: Monad m => (a -> m b) -> Unpackedness a -> m (Unpackedness b) #sequence :: Monad m => Unpackedness (m a) -> m (Unpackedness a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Rhs a -> f (Rhs b) #sequenceA :: Applicative f => Rhs (f a) -> f (Rhs a) #mapM :: Monad m => (a -> m b) -> Rhs a -> m (Rhs b) #sequence :: Monad m => Rhs (m a) -> m (Rhs a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> GuardedRhs a -> f (GuardedRhs b) #sequenceA :: Applicative f => GuardedRhs (f a) -> f (GuardedRhs a) #mapM :: Monad m => (a -> m b) -> GuardedRhs a -> m (GuardedRhs b) #sequence :: Monad m => GuardedRhs (m a) -> m (GuardedRhs a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Type a -> f (Type b) #sequenceA :: Applicative f => Type (f a) -> f (Type a) #mapM :: Monad m => (a -> m b) -> Type a -> m (Type b) #sequence :: Monad m => Type (m a) -> m (Type a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> MaybePromotedName a -> f (MaybePromotedName b) #sequenceA :: Applicative f => MaybePromotedName (f a) -> f (MaybePromotedName a) #mapM :: Monad m => (a -> m b) -> MaybePromotedName a -> m (MaybePromotedName b) #sequence :: Monad m => MaybePromotedName (m a) -> m (MaybePromotedName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Promoted a -> f (Promoted b) #sequenceA :: Applicative f => Promoted (f a) -> f (Promoted a) #mapM :: Monad m => (a -> m b) -> Promoted a -> m (Promoted b) #sequence :: Monad m => Promoted (m a) -> m (Promoted a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> TyVarBind a -> f (TyVarBind b) #sequenceA :: Applicative f => TyVarBind (f a) -> f (TyVarBind a) #mapM :: Monad m => (a -> m b) -> TyVarBind a -> m (TyVarBind b) #sequence :: Monad m => TyVarBind (m a) -> m (TyVarBind a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Kind a -> f (Kind b) #sequenceA :: Applicative f => Kind (f a) -> f (Kind a) #mapM :: Monad m => (a -> m b) -> Kind a -> m (Kind b) #sequence :: Monad m => Kind (m a) -> m (Kind a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> FunDep a -> f (FunDep b) #sequenceA :: Applicative f => FunDep (f a) -> f (FunDep a) #mapM :: Monad m => (a -> m b) -> FunDep a -> m (FunDep b) #sequence :: Monad m => FunDep (m a) -> m (FunDep a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Context a -> f (Context b) #sequenceA :: Applicative f => Context (f a) -> f (Context a) #mapM :: Monad m => (a -> m b) -> Context a -> m (Context b) #sequence :: Monad m => Context (m a) -> m (Context a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Asst a -> f (Asst b) #sequenceA :: Applicative f => Asst (f a) -> f (Asst a) #mapM :: Monad m => (a -> m b) -> Asst a -> m (Asst b) #sequence :: Monad m => Asst (m a) -> m (Asst a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Literal a -> f (Literal b) #sequenceA :: Applicative f => Literal (f a) -> f (Literal a) #mapM :: Monad m => (a -> m b) -> Literal a -> m (Literal b) #sequence :: Monad m => Literal (m a) -> m (Literal a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Sign a -> f (Sign b) #sequenceA :: Applicative f => Sign (f a) -> f (Sign a) #mapM :: Monad m => (a -> m b) -> Sign a -> m (Sign b) #sequence :: Monad m => Sign (m a) -> m (Sign a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Exp a -> f (Exp b) #sequenceA :: Applicative f => Exp (f a) -> f (Exp a) #mapM :: Monad m => (a -> m b) -> Exp a -> m (Exp b) #sequence :: Monad m => Exp (m a) -> m (Exp a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> XName a -> f (XName b) #sequenceA :: Applicative f => XName (f a) -> f (XName a) #mapM :: Monad m => (a -> m b) -> XName a -> m (XName b) #sequence :: Monad m => XName (m a) -> m (XName a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> XAttr a -> f (XAttr b) #sequenceA :: Applicative f => XAttr (f a) -> f (XAttr a) #mapM :: Monad m => (a -> m b) -> XAttr a -> m (XAttr b) #sequence :: Monad m => XAttr (m a) -> m (XAttr a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Bracket a -> f (Bracket b) #sequenceA :: Applicative f => Bracket (f a) -> f (Bracket a) #mapM :: Monad m => (a -> m b) -> Bracket a -> m (Bracket b) #sequence :: Monad m => Bracket (m a) -> m (Bracket a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Splice a -> f (Splice b) #sequenceA :: Applicative f => Splice (f a) -> f (Splice a) #mapM :: Monad m => (a -> m b) -> Splice a -> m (Splice b) #sequence :: Monad m => Splice (m a) -> m (Splice a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Safety a -> f (Safety b) #sequenceA :: Applicative f => Safety (f a) -> f (Safety a) #mapM :: Monad m => (a -> m b) -> Safety a -> m (Safety b) #sequence :: Monad m => Safety (m a) -> m (Safety a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> CallConv a -> f (CallConv b) #sequenceA :: Applicative f => CallConv (f a) -> f (CallConv a) #mapM :: Monad m => (a -> m b) -> CallConv a -> m (CallConv b) #sequence :: Monad m => CallConv (m a) -> m (CallConv a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> ModulePragma a -> f (ModulePragma b) #sequenceA :: Applicative f => ModulePragma (f a) -> f (ModulePragma a) #mapM :: Monad m => (a -> m b) -> ModulePragma a -> m (ModulePragma b) #sequence :: Monad m => ModulePragma (m a) -> m (ModulePragma a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Overlap a -> f (Overlap b) #sequenceA :: Applicative f => Overlap (f a) -> f (Overlap a) #mapM :: Monad m => (a -> m b) -> Overlap a -> m (Overlap b) #sequence :: Monad m => Overlap (m a) -> m (Overlap a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Activation a -> f (Activation b) #sequenceA :: Applicative f => Activation (f a) -> f (Activation a) #mapM :: Monad m => (a -> m b) -> Activation a -> m (Activation b) #sequence :: Monad m => Activation (m a) -> m (Activation a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Rule a -> f (Rule b) #sequenceA :: Applicative f => Rule (f a) -> f (Rule a) #mapM :: Monad m => (a -> m b) -> Rule a -> m (Rule b) #sequence :: Monad m => Rule (m a) -> m (Rule a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> RuleVar a -> f (RuleVar b) #sequenceA :: Applicative f => RuleVar (f a) -> f (RuleVar a) #mapM :: Monad m => (a -> m b) -> RuleVar a -> m (RuleVar b) #sequence :: Monad m => RuleVar (m a) -> m (RuleVar a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> WarningText a -> f (WarningText b) #sequenceA :: Applicative f => WarningText (f a) -> f (WarningText a) #mapM :: Monad m => (a -> m b) -> WarningText a -> m (WarningText b) #sequence :: Monad m => WarningText (m a) -> m (WarningText a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Pat a -> f (Pat b) #sequenceA :: Applicative f => Pat (f a) -> f (Pat a) #mapM :: Monad m => (a -> m b) -> Pat a -> m (Pat b) #sequence :: Monad m => Pat (m a) -> m (Pat a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> PXAttr a -> f (PXAttr b) #sequenceA :: Applicative f => PXAttr (f a) -> f (PXAttr a) #mapM :: Monad m => (a -> m b) -> PXAttr a -> m (PXAttr b) #sequence :: Monad m => PXAttr (m a) -> m (PXAttr a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> RPatOp a -> f (RPatOp b) #sequenceA :: Applicative f => RPatOp (f a) -> f (RPatOp a) #mapM :: Monad m => (a -> m b) -> RPatOp a -> m (RPatOp b) #sequence :: Monad m => RPatOp (m a) -> m (RPatOp a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> RPat a -> f (RPat b) #sequenceA :: Applicative f => RPat (f a) -> f (RPat a) #mapM :: Monad m => (a -> m b) -> RPat a -> m (RPat b) #sequence :: Monad m => RPat (m a) -> m (RPat a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> PatField a -> f (PatField b) #sequenceA :: Applicative f => PatField (f a) -> f (PatField a) #mapM :: Monad m => (a -> m b) -> PatField a -> m (PatField b) #sequence :: Monad m => PatField (m a) -> m (PatField a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Stmt a -> f (Stmt b) #sequenceA :: Applicative f => Stmt (f a) -> f (Stmt a) #mapM :: Monad m => (a -> m b) -> Stmt a -> m (Stmt b) #sequence :: Monad m => Stmt (m a) -> m (Stmt a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> QualStmt a -> f (QualStmt b) #sequenceA :: Applicative f => QualStmt (f a) -> f (QualStmt a) #mapM :: Monad m => (a -> m b) -> QualStmt a -> m (QualStmt b) #sequence :: Monad m => QualStmt (m a) -> m (QualStmt a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> FieldUpdate a -> f (FieldUpdate b) #sequenceA :: Applicative f => FieldUpdate (f a) -> f (FieldUpdate a) #mapM :: Monad m => (a -> m b) -> FieldUpdate a -> m (FieldUpdate b) #sequence :: Monad m => FieldUpdate (m a) -> m (FieldUpdate a) # Instance detailsDefined in Language.Haskell.Exts.Syntax Methodstraverse :: Applicative f => (a -> f b) -> Alt a -> f (Alt b) #sequenceA :: Applicative f => Alt (f a) -> f (Alt a) #mapM :: Monad m => (a -> m b) -> Alt a -> m (Alt b) #sequence :: Monad m => Alt (m a) -> m (Alt a) # Instance detailsDefined in Data.Vector Methodstraverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #sequence :: Monad m => Vector (m a) -> m (Vector a) # Instance detailsDefined in Numeric.Log Methodstraverse :: Applicative f => (a -> f b) -> Log a -> f (Log b) #sequenceA :: Applicative f => Log (f a) -> f (Log a) #mapM :: Monad m => (a -> m b) -> Log a -> m (Log b) #sequence :: Monad m => Log (m a) -> m (Log a) # Transform a document based on its annotations, possibly leveraging Applicative effects. Instance detailsDefined in Data.Text.Prettyprint.Doc.Internal Methodstraverse :: Applicative f => (a -> f b) -> SimpleDocStream a -> f (SimpleDocStream b) #sequenceA :: Applicative f => SimpleDocStream (f a) -> f (SimpleDocStream a) #mapM :: Monad m => (a -> m b) -> SimpleDocStream a -> m (SimpleDocStream b) #sequence :: Monad m => SimpleDocStream (m a) -> m (SimpleDocStream a) # Instance detailsDefined in Data.Primitive.SmallArray Methodstraverse :: Applicative f => (a -> f b) -> SmallArray a -> f (SmallArray b) #sequenceA :: Applicative f => SmallArray (f a) -> f (SmallArray a) #mapM :: Monad m => (a -> m b) -> SmallArray a -> m (SmallArray b) #sequence :: Monad m => SmallArray (m a) -> m (SmallArray a) # Instance detailsDefined in Data.Primitive.Array Methodstraverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) #sequenceA :: Applicative f => Array (f a) -> f (Array a) #mapM :: Monad m => (a -> m b) -> Array a -> m (Array b) #sequence :: Monad m => Array (m a) -> m (Array a) # Instance detailsDefined in Data.Semilattice.Bound Methodstraverse :: Applicative f => (a -> f b) -> Bound a -> f (Bound b) #sequenceA :: Applicative f => Bound (f a) -> f (Bound a) #mapM :: Monad m => (a -> m b) -> Bound a -> m (Bound b) #sequence :: Monad m => Bound (m a) -> m (Bound a) # Instance detailsDefined in Data.Semilattice.Order Methodstraverse :: Applicative f => (a -> f b) -> Order a -> f (Order b) #sequenceA :: Applicative f => Order (f a) -> f (Order a) #mapM :: Monad m => (a -> m b) -> Order a -> m (Order b) #sequence :: Monad m => Order (m a) -> m (Order a) # Instance detailsDefined in Data.Semilattice.Meet Methodstraverse :: Applicative f => (a -> f b) -> Meeting a -> f (Meeting b) #sequenceA :: Applicative f => Meeting (f a) -> f (Meeting a) #mapM :: Monad m => (a -> m b) -> Meeting a -> m (Meeting b) #sequence :: Monad m => Meeting (m a) -> m (Meeting a) # Instance detailsDefined in Data.Semilattice.Meet Methodstraverse :: Applicative f => (a -> f b) -> GreaterThan a -> f (GreaterThan b) #sequenceA :: Applicative f => GreaterThan (f a) -> f (GreaterThan a) #mapM :: Monad m => (a -> m b) -> GreaterThan a -> m (GreaterThan b) #sequence :: Monad m => GreaterThan (m a) -> m (GreaterThan a) # Instance detailsDefined in Data.Semilattice.Join Methodstraverse :: Applicative f => (a -> f b) -> Joining a -> f (Joining b) #sequenceA :: Applicative f => Joining (f a) -> f (Joining a) #mapM :: Monad m => (a -> m b) -> Joining a -> m (Joining b) #sequence :: Monad m => Joining (m a) -> m (Joining a) # Instance detailsDefined in Data.Semilattice.Join Methodstraverse :: Applicative f => (a -> f b) -> LessThan a -> f (LessThan b) #sequenceA :: Applicative f => LessThan (f a) -> f (LessThan a) #mapM :: Monad m => (a -> m b) -> LessThan a -> m (LessThan b) #sequence :: Monad m => LessThan (m a) -> m (LessThan a) # Instance detailsDefined in Data.HashMap.Strict.InsOrd Methodstraverse :: Applicative f => (a -> f b) -> P a -> f (P b) #sequenceA :: Applicative f => P (f a) -> f (P a) #mapM :: Monad m => (a -> m b) -> P a -> m (P b) #sequence :: Monad m => P (m a) -> m (P a) # Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #sequence :: Monad m => Either a (m a0) -> m (Either a a0) # Traversable (V1 :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) #sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) #sequence :: Monad m => V1 (m a) -> m (V1 a) # Traversable (U1 :: * -> *) Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) #sequenceA :: Applicative f => U1 (f a) -> f (U1 a) #mapM :: Monad m => (a -> m b) -> U1 a -> m (U1 b) #sequence :: Monad m => U1 (m a) -> m (U1 a) # Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) #sequenceA :: Applicative f => (a, f a0) -> f (a, a0) #mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) #sequence :: Monad m => (a, m a0) -> m (a, a0) # Instance detailsDefined in Data.HashMap.Base Methodstraverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) # Instance detailsDefined in Data.Map.Internal Methodstraverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) #sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #sequence :: Monad m => Map k (m a) -> m (Map k a) # Ix i => Traversable (Array i) Since: base-2.1 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Array i a -> f (Array i b) #sequenceA :: Applicative f => Array i (f a) -> f (Array i a) #mapM :: Monad m => (a -> m b) -> Array i a -> m (Array i b) #sequence :: Monad m => Array i (m a) -> m (Array i a) # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodstraverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f (Arg a b) #sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) #mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) #sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) # Traversable (Proxy :: * -> *) Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) #sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) #mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) #sequence :: Monad m => Proxy (m a) -> m (Proxy a) # Traversable f => Traversable (MaybeT f) Instance detailsDefined in Control.Monad.Trans.Maybe Methodstraverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) #sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) #mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) #sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) # Traversable f => Traversable (Cofree f) Instance detailsDefined in Control.Comonad.Cofree Methodstraverse :: Applicative f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #sequenceA :: Applicative f0 => Cofree f (f0 a) -> f0 (Cofree f a) #mapM :: Monad m => (a -> m b) -> Cofree f a -> m (Cofree f b) #sequence :: Monad m => Cofree f (m a) -> m (Cofree f a) # Traversable f => Traversable (Free f) Instance detailsDefined in Control.Monad.Free Methodstraverse :: Applicative f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #sequenceA :: Applicative f0 => Free f (f0 a) -> f0 (Free f a) #mapM :: Monad m => (a -> m b) -> Free f a -> m (Free f b) #sequence :: Monad m => Free f (m a) -> m (Free f a) # Instance detailsDefined in Data.Heap Methodstraverse :: Applicative f => (a -> f b) -> Entry p a -> f (Entry p b) #sequenceA :: Applicative f => Entry p (f a) -> f (Entry p a) #mapM :: Monad m => (a -> m b) -> Entry p a -> m (Entry p b) #sequence :: Monad m => Entry p (m a) -> m (Entry p a) # Instance detailsDefined in Data.HashMap.Strict.InsOrd Methodstraverse :: Applicative f => (a -> f b) -> InsOrdHashMap k a -> f (InsOrdHashMap k b) #sequenceA :: Applicative f => InsOrdHashMap k (f a) -> f (InsOrdHashMap k a) #mapM :: Monad m => (a -> m b) -> InsOrdHashMap k a -> m (InsOrdHashMap k b) #sequence :: Monad m => InsOrdHashMap k (m a) -> m (InsOrdHashMap k a) # Traversable f => Traversable (Yoneda f) Instance detailsDefined in Data.Functor.Yoneda Methodstraverse :: Applicative f0 => (a -> f0 b) -> Yoneda f a -> f0 (Yoneda f b) #sequenceA :: Applicative f0 => Yoneda f (f0 a) -> f0 (Yoneda f a) #mapM :: Monad m => (a -> m b) -> Yoneda f a -> m (Yoneda f b) #sequence :: Monad m => Yoneda f (m a) -> m (Yoneda f a) # (Monad m, Traversable m) => Traversable (ListT m) Instance detailsDefined in List.Transformer Methodstraverse :: Applicative f => (a -> f b) -> ListT m a -> f (ListT m b) #sequenceA :: Applicative f => ListT m (f a) -> f (ListT m a) #mapM :: Monad m0 => (a -> m0 b) -> ListT m a -> m0 (ListT m b) #sequence :: Monad m0 => ListT m (m0 a) -> m0 (ListT m a) # (Monad m, Traversable m) => Traversable (Step m) Instance detailsDefined in List.Transformer Methodstraverse :: Applicative f => (a -> f b) -> Step m a -> f (Step m b) #sequenceA :: Applicative f => Step m (f a) -> f (Step m a) #mapM :: Monad m0 => (a -> m0 b) -> Step m a -> m0 (Step m b) #sequence :: Monad m0 => Step m (m0 a) -> m0 (Step m a) # Instance detailsDefined in Control.Monad.Logic Methodstraverse :: Applicative f => (a -> f b) -> LogicT Identity a -> f (LogicT Identity b) #sequenceA :: Applicative f => LogicT Identity (f a) -> f (LogicT Identity a) #mapM :: Monad m => (a -> m b) -> LogicT Identity a -> m (LogicT Identity b) #sequence :: Monad m => LogicT Identity (m a) -> m (LogicT Identity a) # Instance detailsDefined in Data.IntPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> IntPSQ p a -> f (IntPSQ p b) #sequenceA :: Applicative f => IntPSQ p (f a) -> f (IntPSQ p a) #mapM :: Monad m => (a -> m b) -> IntPSQ p a -> m (IntPSQ p b) #sequence :: Monad m => IntPSQ p (m a) -> m (IntPSQ p a) # Traversable f => Traversable (Rec1 f) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 (Rec1 f a) #mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) #sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) # Traversable (URec Char :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec Char a -> f (URec Char b) #sequenceA :: Applicative f => URec Char (f a) -> f (URec Char a) #mapM :: Monad m => (a -> m b) -> URec Char a -> m (URec Char b) #sequence :: Monad m => URec Char (m a) -> m (URec Char a) # Traversable (URec Double :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec Double a -> f (URec Double b) #sequenceA :: Applicative f => URec Double (f a) -> f (URec Double a) #mapM :: Monad m => (a -> m b) -> URec Double a -> m (URec Double b) #sequence :: Monad m => URec Double (m a) -> m (URec Double a) # Traversable (URec Float :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec Float a -> f (URec Float b) #sequenceA :: Applicative f => URec Float (f a) -> f (URec Float a) #mapM :: Monad m => (a -> m b) -> URec Float a -> m (URec Float b) #sequence :: Monad m => URec Float (m a) -> m (URec Float a) # Traversable (URec Int :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec Int a -> f (URec Int b) #sequenceA :: Applicative f => URec Int (f a) -> f (URec Int a) #mapM :: Monad m => (a -> m b) -> URec Int a -> m (URec Int b) #sequence :: Monad m => URec Int (m a) -> m (URec Int a) # Traversable (URec Word :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec Word a -> f (URec Word b) #sequenceA :: Applicative f => URec Word (f a) -> f (URec Word a) #mapM :: Monad m => (a -> m b) -> URec Word a -> m (URec Word b) #sequence :: Monad m => URec Word (m a) -> m (URec Word a) # Traversable (URec (Ptr ()) :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> URec (Ptr ()) a -> f (URec (Ptr ()) b) #sequenceA :: Applicative f => URec (Ptr ()) (f a) -> f (URec (Ptr ()) a) #mapM :: Monad m => (a -> m b) -> URec (Ptr ()) a -> m (URec (Ptr ()) b) #sequence :: Monad m => URec (Ptr ()) (m a) -> m (URec (Ptr ()) a) # Traversable (Const m :: * -> *) Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) # Bitraversable p => Traversable (Join p) Instance detailsDefined in Data.Bifunctor.Join Methodstraverse :: Applicative f => (a -> f b) -> Join p a -> f (Join p b) #sequenceA :: Applicative f => Join p (f a) -> f (Join p a) #mapM :: Monad m => (a -> m b) -> Join p a -> m (Join p b) #sequence :: Monad m => Join p (m a) -> m (Join p a) # Bitraversable p => Traversable (Fix p) Instance detailsDefined in Data.Bifunctor.Fix Methodstraverse :: Applicative f => (a -> f b) -> Fix p a -> f (Fix p b) #sequenceA :: Applicative f => Fix p (f a) -> f (Fix p a) #mapM :: Monad m => (a -> m b) -> Fix p a -> m (Fix p b) #sequence :: Monad m => Fix p (m a) -> m (Fix p a) # Instance detailsDefined in Control.Monad.Trans.Identity Methodstraverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) #sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) #mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) #sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) # Traversable f => Traversable (ExceptT e f) Instance detailsDefined in Control.Monad.Trans.Except Methodstraverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 (ExceptT e f b) #sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 (ExceptT e f a) #mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m (ExceptT e f b) #sequence :: Monad m => ExceptT e f (m a) -> m (ExceptT e f a) # Traversable f => Traversable (FreeF f a) Instance detailsDefined in Control.Monad.Trans.Free Methodstraverse :: Applicative f0 => (a0 -> f0 b) -> FreeF f a a0 -> f0 (FreeF f a b) #sequenceA :: Applicative f0 => FreeF f a (f0 a0) -> f0 (FreeF f a a0) #mapM :: Monad m => (a0 -> m b) -> FreeF f a a0 -> m (FreeF f a b) #sequence :: Monad m => FreeF f a (m a0) -> m (FreeF f a a0) # (Monad m, Traversable m, Traversable f) => Traversable (FreeT f m) Instance detailsDefined in Control.Monad.Trans.Free Methodstraverse :: Applicative f0 => (a -> f0 b) -> FreeT f m a -> f0 (FreeT f m b) #sequenceA :: Applicative f0 => FreeT f m (f0 a) -> f0 (FreeT f m a) #mapM :: Monad m0 => (a -> m0 b) -> FreeT f m a -> m0 (FreeT f m b) #sequence :: Monad m0 => FreeT f m (m0 a) -> m0 (FreeT f m a) # Traversable f => Traversable (CofreeF f a) Instance detailsDefined in Control.Comonad.Trans.Cofree Methodstraverse :: Applicative f0 => (a0 -> f0 b) -> CofreeF f a a0 -> f0 (CofreeF f a b) #sequenceA :: Applicative f0 => CofreeF f a (f0 a0) -> f0 (CofreeF f a a0) #mapM :: Monad m => (a0 -> m b) -> CofreeF f a a0 -> m (CofreeF f a b) #sequence :: Monad m => CofreeF f a (m a0) -> m (CofreeF f a a0) # (Traversable f, Traversable w) => Traversable (CofreeT f w) Instance detailsDefined in Control.Comonad.Trans.Cofree Methodstraverse :: Applicative f0 => (a -> f0 b) -> CofreeT f w a -> f0 (CofreeT f w b) #sequenceA :: Applicative f0 => CofreeT f w (f0 a) -> f0 (CofreeT f w a) #mapM :: Monad m => (a -> m b) -> CofreeT f w a -> m (CofreeT f w b) #sequence :: Monad m => CofreeT f w (m a) -> m (CofreeT f w a) # Traversable f => Traversable (ErrorT e f) Instance detailsDefined in Control.Monad.Trans.Error Methodstraverse :: Applicative f0 => (a -> f0 b) -> ErrorT e f a -> f0 (ErrorT e f b) #sequenceA :: Applicative f0 => ErrorT e f (f0 a) -> f0 (ErrorT e f a) #mapM :: Monad m => (a -> m b) -> ErrorT e f a -> m (ErrorT e f b) #sequence :: Monad m => ErrorT e f (m a) -> m (ErrorT e f a) # Derived instance. Instance detailsDefined in Control.Applicative.Backwards Methodstraverse :: Applicative f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) #sequenceA :: Applicative f0 => Backwards f (f0 a) -> f0 (Backwards f a) #mapM :: Monad m => (a -> m b) -> Backwards f a -> m (Backwards f b) #sequence :: Monad m => Backwards f (m a) -> m (Backwards f a) # Traversable (Forget r a) Instance detailsDefined in Data.Profunctor.Types Methodstraverse :: Applicative f => (a0 -> f b) -> Forget r a a0 -> f (Forget r a b) #sequenceA :: Applicative f => Forget r a (f a0) -> f (Forget r a a0) #mapM :: Monad m => (a0 -> m b) -> Forget r a a0 -> m (Forget r a b) #sequence :: Monad m => Forget r a (m a0) -> m (Forget r a a0) # Traversable (Bucket k p) Instance detailsDefined in Data.HashPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> Bucket k p a -> f (Bucket k p b) #sequenceA :: Applicative f => Bucket k p (f a) -> f (Bucket k p a) #mapM :: Monad m => (a -> m b) -> Bucket k p a -> m (Bucket k p b) #sequence :: Monad m => Bucket k p (m a) -> m (Bucket k p a) # Traversable (LTree k p) Instance detailsDefined in Data.OrdPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> LTree k p a -> f (LTree k p b) #sequenceA :: Applicative f => LTree k p (f a) -> f (LTree k p a) #mapM :: Monad m => (a -> m b) -> LTree k p a -> m (LTree k p b) #sequence :: Monad m => LTree k p (m a) -> m (LTree k p a) # Traversable (Elem k p) Instance detailsDefined in Data.OrdPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> Elem k p a -> f (Elem k p b) #sequenceA :: Applicative f => Elem k p (f a) -> f (Elem k p a) #mapM :: Monad m => (a -> m b) -> Elem k p a -> m (Elem k p b) #sequence :: Monad m => Elem k p (m a) -> m (Elem k p a) # Traversable (HashPSQ k p) Instance detailsDefined in Data.HashPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> HashPSQ k p a -> f (HashPSQ k p b) #sequenceA :: Applicative f => HashPSQ k p (f a) -> f (HashPSQ k p a) #mapM :: Monad m => (a -> m b) -> HashPSQ k p a -> m (HashPSQ k p b) #sequence :: Monad m => HashPSQ k p (m a) -> m (HashPSQ k p a) # Traversable (OrdPSQ k p) Instance detailsDefined in Data.OrdPSQ.Internal Methodstraverse :: Applicative f => (a -> f b) -> OrdPSQ k p a -> f (OrdPSQ k p b) #sequenceA :: Applicative f => OrdPSQ k p (f a) -> f (OrdPSQ k p a) #mapM :: Monad m => (a -> m b) -> OrdPSQ k p a -> m (OrdPSQ k p b) #sequence :: Monad m => OrdPSQ k p (m a) -> m (OrdPSQ k p a) # Instance detailsDefined in Data.Tagged Methodstraverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) #sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) #mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) #sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) # Traversable (K1 i c :: * -> *) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) #sequenceA :: Applicative f => K1 i c (f a) -> f (K1 i c a) #mapM :: Monad m => (a -> m b) -> K1 i c a -> m (K1 i c b) #sequence :: Monad m => K1 i c (m a) -> m (K1 i c a) # (Traversable f, Traversable g) => Traversable (f :+: g) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) #mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) #sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) # (Traversable f, Traversable g) => Traversable (f :*: g) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) #mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) #sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) # (Traversable f, Traversable g) => Traversable (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methodstraverse :: Applicative f0 => (a -> f0 b) -> Product f g a -> f0 (Product f g b) #sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 (Product f g a) #mapM :: Monad m => (a -> m b) -> Product f g a -> m (Product f g b) #sequence :: Monad m => Product f g (m a) -> m (Product f g a) # (Traversable f, Traversable g) => Traversable (Sum f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Sum Methodstraverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 (Sum f g a) #mapM :: Monad m => (a -> m b) -> Sum f g a -> m (Sum f g b) #sequence :: Monad m => Sum f g (m a) -> m (Sum f g a) # Traversable (Magma i t b) Instance detailsDefined in Control.Lens.Internal.Magma Methodstraverse :: Applicative f => (a -> f b0) -> Magma i t b a -> f (Magma i t b b0) #sequenceA :: Applicative f => Magma i t b (f a) -> f (Magma i t b a) #mapM :: Monad m => (a -> m b0) -> Magma i t b a -> m (Magma i t b b0) #sequence :: Monad m => Magma i t b (m a) -> m (Magma i t b a) # Traversable f => Traversable (M1 i c f) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 (M1 i c f b) #sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 (M1 i c f a) #mapM :: Monad m => (a -> m b) -> M1 i c f a -> m (M1 i c f b) #sequence :: Monad m => M1 i c f (m a) -> m (M1 i c f a) # (Traversable f, Traversable g) => Traversable (f :.: g) Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) #sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) #mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) #sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) # (Traversable f, Traversable g) => Traversable (Compose f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Methodstraverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) # Instance detailsDefined in Data.Bifunctor.Wrapped Methodstraverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) #sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) #mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) #sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) # Traversable g => Traversable (Joker g a) Instance detailsDefined in Data.Bifunctor.Joker Methodstraverse :: Applicative f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #sequenceA :: Applicative f => Joker g a (f a0) -> f (Joker g a a0) #mapM :: Monad m => (a0 -> m b) -> Joker g a a0 -> m (Joker g a b) #sequence :: Monad m => Joker g a (m a0) -> m (Joker g a a0) # Bitraversable p => Traversable (Flip p a) Instance detailsDefined in Data.Bifunctor.Flip Methodstraverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f (Flip p a b) #sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) #mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) #sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) # Traversable (Clown f a :: * -> *) Instance detailsDefined in Data.Bifunctor.Clown Methodstraverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 (Clown f a b) #sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 (Clown f a a0) #mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m (Clown f a b) #sequence :: Monad m => Clown f a (m a0) -> m (Clown f a a0) # (Traversable f, Bitraversable p) => Traversable (Tannen f p a) Instance detailsDefined in Data.Bifunctor.Tannen Methodstraverse :: Applicative f0 => (a0 -> f0 b) -> Tannen f p a a0 -> f0 (Tannen f p a b) #sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 (Tannen f p a a0) #mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m (Tannen f p a b) #sequence :: Monad m => Tannen f p a (m a0) -> m (Tannen f p a a0) # (Bitraversable p, Traversable g) => Traversable (Biff p f g a) Instance detailsDefined in Data.Bifunctor.Biff Methodstraverse :: Applicative f0 => (a0 -> f0 b) -> Biff p f g a a0 -> f0 (Biff p f g a b) #sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 (Biff p f g a a0) #mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m (Biff p f g a b) #sequence :: Monad m => Biff p f g a (m a0) -> m (Biff p f g a a0) # for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b) # for is traverse with its arguments flipped. For a version that ignores the results see for_. mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) # The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure. mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) # The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure. traverseBy :: Traversable t => (forall x. x -> f x) -> (forall x y. f (x -> y) -> f x -> f y) -> (a -> f b) -> t a -> f (t b) # Traverse a container using its Traversable instance using explicitly provided Applicative operations. This is like traverse where the Applicative instance can be manually specified. sequenceBy :: Traversable t => (forall x. x -> f x) -> (forall x y. f (x -> y) -> f x -> f y) -> t (f a) -> f (t a) # Sequence a container using its Traversable instance using explicitly provided Applicative operations. This is like sequence where the Applicative instance can be manually specified. # Traversable1 class (Foldable1 t, Traversable t) => Traversable1 (t :: * -> *) where # Minimal complete definition Methods traverse1 :: Apply f => (a -> f b) -> t a -> f (t b) # sequence1 :: Apply f => t (f b) -> f (t b) # Instances  Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Par1 a -> f (Par1 b) #sequence1 :: Apply f => Par1 (f b) -> f (Par1 b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Complex a -> f (Complex b) #sequence1 :: Apply f => Complex (f b) -> f (Complex b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Min a -> f (Min b) #sequence1 :: Apply f => Min (f b) -> f (Min b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Max a -> f (Max b) #sequence1 :: Apply f => Max (f b) -> f (Max b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> First a -> f (First b) #sequence1 :: Apply f => First (f b) -> f (First b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Last a -> f (Last b) #sequence1 :: Apply f => Last (f b) -> f (Last b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Identity a -> f (Identity b) #sequence1 :: Apply f => Identity (f b) -> f (Identity b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Dual a -> f (Dual b) #sequence1 :: Apply f => Dual (f b) -> f (Dual b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Sum a -> f (Sum b) #sequence1 :: Apply f => Sum (f b) -> f (Sum b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Product a -> f (Product b) #sequence1 :: Apply f => Product (f b) -> f (Product b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #sequence1 :: Apply f => NonEmpty (f b) -> f (NonEmpty b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Tree a -> f (Tree b) #sequence1 :: Apply f => Tree (f b) -> f (Tree b) # Instance detailsDefined in Numeric.Log Methodstraverse1 :: Apply f => (a -> f b) -> Log a -> f (Log b) #sequence1 :: Apply f => Log (f b) -> f (Log b) # Traversable1 (V1 :: * -> *) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> V1 a -> f (V1 b) #sequence1 :: Apply f => V1 (f b) -> f (V1 b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a0 -> f b) -> (a, a0) -> f (a, b) #sequence1 :: Apply f => (a, f b) -> f (a, b) # Instance detailsDefined in Control.Comonad.Cofree Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #sequence1 :: Apply f0 => Cofree f (f0 b) -> f0 (Cofree f b) # Traversable1 f => Traversable1 (Free f) Instance detailsDefined in Control.Monad.Free Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #sequence1 :: Apply f0 => Free f (f0 b) -> f0 (Free f b) # Instance detailsDefined in Data.Functor.Yoneda Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Yoneda f a -> f0 (Yoneda f b) #sequence1 :: Apply f0 => Yoneda f (f0 b) -> f0 (Yoneda f b) # Traversable1 f => Traversable1 (Lift f) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Lift f a -> f0 (Lift f b) #sequence1 :: Apply f0 => Lift f (f0 b) -> f0 (Lift f b) # Traversable1 f => Traversable1 (Rec1 f) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #sequence1 :: Apply f0 => Rec1 f (f0 b) -> f0 (Rec1 f b) # Traversable1 f => Traversable1 (Alt f) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #sequence1 :: Apply f0 => Alt f (f0 b) -> f0 (Alt f b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a -> f b) -> Join p a -> f (Join p b) #sequence1 :: Apply f => Join p (f b) -> f (Join p b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) #sequence1 :: Apply f0 => IdentityT f (f0 b) -> f0 (IdentityT f b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) #sequence1 :: Apply f0 => Backwards f (f0 b) -> f0 (Backwards f b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a0 -> f b) -> Tagged a a0 -> f (Tagged a b) #sequence1 :: Apply f => Tagged a (f b) -> f (Tagged a b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) #sequence1 :: Apply f0 => Reverse f (f0 b) -> f0 (Reverse f b) # (Traversable1 f, Traversable1 g) => Traversable1 (f :+: g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #sequence1 :: Apply f0 => (f :+: g) (f0 b) -> f0 ((f :+: g) b) # (Traversable1 f, Traversable1 g) => Traversable1 (f :*: g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #sequence1 :: Apply f0 => (f :*: g) (f0 b) -> f0 ((f :*: g) b) # (Traversable1 f, Traversable1 g) => Traversable1 (Product f g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Product f g a -> f0 (Product f g b) #sequence1 :: Apply f0 => Product f g (f0 b) -> f0 (Product f g b) # (Traversable1 f, Traversable1 g) => Traversable1 (Sum f g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #sequence1 :: Apply f0 => Sum f g (f0 b) -> f0 (Sum f g b) # Traversable1 f => Traversable1 (M1 i c f) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> M1 i c f a -> f0 (M1 i c f b) #sequence1 :: Apply f0 => M1 i c f (f0 b) -> f0 (M1 i c f b) # (Traversable1 f, Traversable1 g) => Traversable1 (f :.: g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) #sequence1 :: Apply f0 => (f :.: g) (f0 b) -> f0 ((f :.: g) b) # (Traversable1 f, Traversable1 g) => Traversable1 (Compose f g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #sequence1 :: Apply f0 => Compose f g (f0 b) -> f0 (Compose f g b) # Traversable1 g => Traversable1 (Joker g a) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodstraverse1 :: Apply f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #sequence1 :: Apply f => Joker g a (f b) -> f (Joker g a b) # # Bitraversable class (Bifunctor t, Bifoldable t) => Bitraversable (t :: * -> * -> *) where # Bitraversable identifies bifunctorial data structures whose elements can be traversed in order, performing Applicative or Monad actions at each element, and collecting a result structure with the same shape. As opposed to Traversable data structures, which have one variety of element on which an action can be performed, Bitraversable data structures have two such varieties of elements. A definition of bitraverse must satisfy the following laws: naturality bitraverse (t . f) (t . g) ≡ t . bitraverse f g for every applicative transformation t identity bitraverse Identity Identity ≡ Identity composition Compose . fmap (bitraverse g1 g2) . bitraverse f1 f2 ≡ traverse (Compose . fmap g1 . f1) (Compose . fmap g2 . f2) where an applicative transformation is a function t :: (Applicative f, Applicative g) => f a -> g a preserving the Applicative operations: t (pure x) = pure x t (f <*> x) = t f <*> t x  and the identity functor Identity and composition functors Compose are defined as newtype Identity a = Identity { runIdentity :: a } instance Functor Identity where fmap f (Identity x) = Identity (f x) instance Applicative Identity where pure = Identity Identity f <*> Identity x = Identity (f x) newtype Compose f g a = Compose (f (g a)) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose x) = Compose (fmap (fmap f) x) instance (Applicative f, Applicative g) => Applicative (Compose f g) where pure = Compose . pure . pure Compose f <*> Compose x = Compose ((<*>) <$> f <*> x)

Some simple examples are Either and '(,)':

instance Bitraversable Either where
bitraverse f _ (Left x) = Left <$> f x bitraverse _ g (Right y) = Right <$> g y

instance Bitraversable (,) where
bitraverse f g (x, y) = (,) <\$> f x <*> g y

Bitraversable relates to its superclasses in the following ways:

bimap f g ≡ runIdentity . bitraverse (Identity . f) (Identity . g)
bifoldMap f g = getConst . bitraverse (Const . f) (Const . g)


These are available as bimapDefault and bifoldMapDefault respectively.

Since: base-4.10.0.0

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d) #

Evaluates the relevant functions at each element in the structure, running the action, and builds a new structure with the same shape, using the results produced from sequencing the actions.

bitraverse f g ≡ bisequenceA . bimap f g

For a version that ignores the results, see bitraverse_.

Since: base-4.10.0.0

Instances
 Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) # Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a, b) -> f (c, d) # Since: base-4.10.0.0 Instance detailsDefined in Data.Semigroup Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Arg a b -> f (Arg c d) # Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, a, b) -> f (x, c, d) # Bitraversable (Const :: * -> * -> *) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) # Instance detailsDefined in Control.Monad.Trans.Free Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> FreeF f a b -> f0 (FreeF f c d) # Instance detailsDefined in Control.Comonad.Trans.Cofree Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> CofreeF f a b -> f0 (CofreeF f c d) # Bitraversable (Tagged :: * -> * -> *) Instance detailsDefined in Data.Tagged Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Tagged a b -> f (Tagged c d) # Bitraversable (K1 i :: * -> * -> *) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> K1 i a b -> f (K1 i c d) # Bitraversable ((,,,) x y) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, a, b) -> f (x, y, c, d) # Bitraversable ((,,,,) x y z) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, a, b) -> f (x, y, z, c, d) # Instance detailsDefined in Data.Bifunctor.Wrapped Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> WrappedBifunctor p a b -> f (WrappedBifunctor p c d) # Traversable g => Bitraversable (Joker g :: * -> * -> *) Instance detailsDefined in Data.Bifunctor.Joker Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Joker g a b -> f (Joker g c d) # Instance detailsDefined in Data.Bifunctor.Flip Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Flip p a b -> f (Flip p c d) # Traversable f => Bitraversable (Clown f :: * -> * -> *) Instance detailsDefined in Data.Bifunctor.Clown Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Clown f a b -> f0 (Clown f c d) # Bitraversable ((,,,,,) x y z w) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, a, b) -> f (x, y, z, w, c, d) # (Bitraversable p, Bitraversable q) => Bitraversable (Sum p q) Instance detailsDefined in Data.Bifunctor.Sum Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Sum p q a b -> f (Sum p q c d) # (Bitraversable f, Bitraversable g) => Bitraversable (Product f g) Instance detailsDefined in Data.Bifunctor.Product Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Product f g a b -> f0 (Product f g c d) # Bitraversable ((,,,,,,) x y z w v) Since: base-4.10.0.0 Instance detailsDefined in Data.Bitraversable Methodsbitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, v, a, b) -> f (x, y, z, w, v, c, d) # (Traversable f, Bitraversable p) => Bitraversable (Tannen f p) Instance detailsDefined in Data.Bifunctor.Tannen Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Tannen f p a b -> f0 (Tannen f p c d) # (Bitraversable p, Traversable f, Traversable g) => Bitraversable (Biff p f g) Instance detailsDefined in Data.Bifunctor.Biff Methodsbitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Biff p f g a b -> f0 (Biff p f g c d) #

bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b) #

Sequences all the actions in a structure, building a new structure with the same shape using the results of the actions. For a version that ignores the results, see bisequence_.

bisequence ≡ bitraverse id id

Since: base-4.10.0.0

bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d) #

bifor is bitraverse with the structure as the first argument. For a version that ignores the results, see bifor_.

Since: base-4.10.0.0

bimapAccumL :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e) #

The bimapAccumL function behaves like a combination of bimap and bifoldl; it traverses a structure from left to right, threading a state of type a and using the given actions to compute new elements for the structure.

Since: base-4.10.0.0

bimapAccumR :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e) #

The bimapAccumR function behaves like a combination of bimap and bifoldl; it traverses a structure from right to left, threading a state of type a and using the given actions to compute new elements for the structure.

Since: base-4.10.0.0

# Bitraversable1

class (Bifoldable1 t, Bitraversable t) => Bitraversable1 (t :: * -> * -> *) where #

Minimal complete definition

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> t a c -> f (t b d) #

bisequence1 :: Apply f => t (f a) (f b) -> f (t a b) #

Instances
 Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Either a c -> f (Either b d) #bisequence1 :: Apply f => Either (f a) (f b) -> f (Either a b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (a, c) -> f (b, d) #bisequence1 :: Apply f => (f a, f b) -> f (a, b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Arg a c -> f (Arg b d) #bisequence1 :: Apply f => Arg (f a) (f b) -> f (Arg a b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, a, c) -> f (x, b, d) #bisequence1 :: Apply f => (x, f a, f b) -> f (x, a, b) # Bitraversable1 (Const :: * -> * -> *) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Const a c -> f (Const b d) #bisequence1 :: Apply f => Const (f a) (f b) -> f (Const a b) # Bitraversable1 (Tagged :: * -> * -> *) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Tagged a c -> f (Tagged b d) #bisequence1 :: Apply f => Tagged (f a) (f b) -> f (Tagged a b) # Bitraversable1 ((,,,) x y) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, y, a, c) -> f (x, y, b, d) #bisequence1 :: Apply f => (x, y, f a, f b) -> f (x, y, a, b) # Bitraversable1 ((,,,,) x y z) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, y, z, a, c) -> f (x, y, z, b, d) #bisequence1 :: Apply f => (x, y, z, f a, f b) -> f (x, y, z, a, b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> WrappedBifunctor p a c -> f (WrappedBifunctor p b d) #bisequence1 :: Apply f => WrappedBifunctor p (f a) (f b) -> f (WrappedBifunctor p a b) # Traversable1 g => Bitraversable1 (Joker g :: * -> * -> *) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Joker g a c -> f (Joker g b d) #bisequence1 :: Apply f => Joker g (f a) (f b) -> f (Joker g a b) # Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Flip p a c -> f (Flip p b d) #bisequence1 :: Apply f => Flip p (f a) (f b) -> f (Flip p a b) # Traversable1 f => Bitraversable1 (Clown f :: * -> * -> *) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Clown f a c -> f0 (Clown f b d) #bisequence1 :: Apply f0 => Clown f (f0 a) (f0 b) -> f0 (Clown f a b) # (Bitraversable1 f, Bitraversable1 g) => Bitraversable1 (Product f g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Product f g a c -> f0 (Product f g b d) #bisequence1 :: Apply f0 => Product f g (f0 a) (f0 b) -> f0 (Product f g a b) # (Traversable1 f, Bitraversable1 p) => Bitraversable1 (Tannen f p) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Tannen f p a c -> f0 (Tannen f p b d) #bisequence1 :: Apply f0 => Tannen f p (f0 a) (f0 b) -> f0 (Tannen f p a b) # (Bitraversable1 p, Traversable1 f, Traversable1 g) => Bitraversable1 (Biff p f g) Instance detailsDefined in Data.Semigroup.Traversable.Class Methodsbitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Biff p f g a c -> f0 (Biff p f g b d) #bisequence1 :: Apply f0 => Biff p f g (f0 a) (f0 b) -> f0 (Biff p f g a b) #

# Default implementations

fmapDefault :: Traversable t => (a -> b) -> t a -> t b #

This function may be used as a value for fmap in a Functor instance, provided that traverse is defined. (Using fmapDefault with a Traversable instance defined only by sequenceA will result in infinite recursion.)

fmapDefault f ≡ runIdentity . traverse (Identity . f)


foldMapDefault :: (Traversable t, Monoid m) => (a -> m) -> t a -> m #

This function may be used as a value for foldMap in a Foldable instance.

foldMapDefault f ≡ getConst . traverse (Const . f)


bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d #

A default definition of bimap in terms of the Bitraversable operations.

bimapDefault f g ≡
runIdentity . bitraverse (Identity . f) (Identity . g)

Since: base-4.10.0.0

bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m #

A default definition of bifoldMap in terms of the Bitraversable operations.

bifoldMapDefault f g ≡
getConst . bitraverse (Const . f) (Const . g)

Since: base-4.10.0.0

bifoldMap1Default :: (Bitraversable1 t, Semigroup m) => (a -> m) -> (b -> m) -> t a b -> m #