Data.Bitraversable
#Bitraversable
class Bitraversable :: (Type -> Type -> Type) -> Constraint
class (Bifunctor t, Bifoldable t) <= Bitraversable t where
Bitraversable
represents data structures with two type arguments which can be
traversed.
A traversal for such a structure requires two functions, one for each type argument. Type class instances should choose the appropriate function based on the type of the element encountered at each point of the traversal.
Default implementations are provided by the following functions:
bitraverseDefault
bisequenceDefault
Members
bitraverse :: forall f a b c d. Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bisequence :: forall f a b. Applicative f => t (f a) (f b) -> f (t a b)
Instances
(Traversable f) => Bitraversable (Clown f)
(Traversable f) => Bitraversable (Joker f)
(Bitraversable p) => Bitraversable (Flip p)
(Bitraversable f, Bitraversable g) => Bitraversable (Product2 f g)
Bitraversable Either
Bitraversable Tuple
Bitraversable Const
#bitraverseDefault
bitraverseDefault :: forall t f a b c d. Bitraversable t => Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
A default implementation of bitraverse
using bisequence
and bimap
.
#bisequenceDefault
bisequenceDefault :: forall t f a b. Bitraversable t => Applicative f => t (f a) (f b) -> f (t a b)
A default implementation of bisequence
using bitraverse
.
#ltraverse
ltraverse :: forall t b c a f. Bitraversable t => Applicative f => (a -> f c) -> t a b -> f (t c b)
#rtraverse
rtraverse :: forall t b c a f. Bitraversable t => Applicative f => (b -> f c) -> t a b -> f (t a c)
#bifor
bifor :: forall t f a b c d. Bitraversable t => Applicative f => t a b -> (a -> f c) -> (b -> f d) -> f (t c d)
Traverse a data structure, accumulating effects and results using an Applicative
functor.
#lfor
lfor :: forall t b c a f. Bitraversable t => Applicative f => t a b -> (a -> f c) -> f (t c b)
#rfor
rfor :: forall t b c a f. Bitraversable t => Applicative f => t a b -> (b -> f c) -> f (t a c)
Re-exports from Data.Bifoldable
#Bifoldable
class Bifoldable :: (Type -> Type -> Type) -> Constraint
class Bifoldable p where
Bifoldable
represents data structures with two type arguments which can be
folded.
A fold for such a structure requires two step functions, one for each type argument. Type class instances should choose the appropriate step function based on the type of the element encountered at each point of the fold.
Default implementations are provided by the following functions:
bifoldrDefault
bifoldlDefault
bifoldMapDefaultR
bifoldMapDefaultL
Note: some combinations of the default implementations are unsafe to use together - causing a non-terminating mutually recursive cycle. These combinations are documented per function.
Members
bifoldr :: forall a b c. (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldl :: forall a b c. (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> p a b -> m
Instances
(Foldable f) => Bifoldable (Clown f)
(Foldable f) => Bifoldable (Joker f)
(Bifoldable p) => Bifoldable (Flip p)
(Bifoldable f, Bifoldable g) => Bifoldable (Product2 f g)
Bifoldable Either
Bifoldable Tuple
Bifoldable Const
#bitraverse_
bitraverse_ :: forall t f a b c d. Bifoldable t => Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f Unit
Traverse a data structure, accumulating effects using an Applicative
functor,
ignoring the final result.
#bisequence_
bisequence_ :: forall t f a b. Bifoldable t => Applicative f => t (f a) (f b) -> f Unit
Collapse a data structure, collecting effects using an Applicative
functor,
ignoring the final result.
#bifor_
bifor_ :: forall t f a b c d. Bifoldable t => Applicative f => t a b -> (a -> f c) -> (b -> f d) -> f Unit
A version of bitraverse_
with the data structure as the first argument.
#bifoldrDefault
bifoldrDefault :: forall p a b c. Bifoldable p => (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
A default implementation of bifoldr
using bifoldMap
.
Note: when defining a Bifoldable
instance, this function is unsafe to
use in combination with bifoldMapDefaultR
.
#bifoldlDefault
bifoldlDefault :: forall p a b c. Bifoldable p => (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
A default implementation of bifoldl
using bifoldMap
.
Note: when defining a Bifoldable
instance, this function is unsafe to
use in combination with bifoldMapDefaultL
.
#bifoldMapDefaultR
bifoldMapDefaultR :: forall p m a b. Bifoldable p => Monoid m => (a -> m) -> (b -> m) -> p a b -> m
A default implementation of bifoldMap
using bifoldr
.
Note: when defining a Bifoldable
instance, this function is unsafe to
use in combination with bifoldrDefault
.
#bifoldMapDefaultL
bifoldMapDefaultL :: forall p m a b. Bifoldable p => Monoid m => (a -> m) -> (b -> m) -> p a b -> m
A default implementation of bifoldMap
using bifoldl
.
Note: when defining a Bifoldable
instance, this function is unsafe to
use in combination with bifoldlDefault
.
#bifold
bifold :: forall t m. Bifoldable t => Monoid m => t m m -> m
Fold a data structure, accumulating values in a monoidal type.
#biany
biany :: forall t a b c. Bifoldable t => BooleanAlgebra c => (a -> c) -> (b -> c) -> t a b -> c
Test whether a predicate holds at any position in a data structure.
#biall
biall :: forall t a b c. Bifoldable t => BooleanAlgebra c => (a -> c) -> (b -> c) -> t a b -> c
Test whether a predicate holds at all positions in a data structure.
Packages
assert
catenable-lists
const
convertable-options
datetime-parsing
debug
distributive
erl-atom
erl-gun
erl-lager
erl-logger
erl-maps
erl-modules
erl-nativerefs
erl-opentelemetry
- OpenTelemetry.Metrics
- OpenTelemetry.Metrics.Counter
- OpenTelemetry.Metrics.Meter
- OpenTelemetry.Metrics.SumObserver
- OpenTelemetry.Metrics.UpDownCounter
- OpenTelemetry.Metrics.UpDownSumObserver
- OpenTelemetry.Metrics.ValueObserver
- OpenTelemetry.Metrics.ValueRecorder
- OpenTelemetry.Tracing
- OpenTelemetry.Tracing.Baggage
- OpenTelemetry.Tracing.Ctx
- OpenTelemetry.Tracing.Propagator.TextMap
- OpenTelemetry.Tracing.Span
- OpenTelemetry.Tracing.Tracer
- Tracing.Attributes
erl-process
erl-queue
erl-ranch
erl-simplebus
erl-ssl
erl-test-eunit
erl-test-eunit-discovery
erl-tuples
erl-untagged-union
exceptions
exists
expect-inferred
functions
graphs
heterogeneous
identity
integers
invariant
js-uri
lazy
lcg
math
media-types
newtype
nonempty
nullable
ordered-collections
partial
prelude
- Control.Applicative
- Control.Apply
- Control.Bind
- Control.Category
- Control.Monad
- Control.Semigroupoid
- Data.Boolean
- Data.BooleanAlgebra
- Data.Bounded
- Data.Bounded.Generic
- Data.CommutativeRing
- Data.DivisionRing
- Data.Eq
- Data.Eq.Generic
- Data.EuclideanRing
- Data.Field
- Data.Function
- Data.Functor
- Data.Generic.Rep
- Data.HeytingAlgebra
- Data.HeytingAlgebra.Generic
- Data.Monoid
- Data.Monoid.Additive
- Data.Monoid.Conj
- Data.Monoid.Disj
- Data.Monoid.Dual
- Data.Monoid.Endo
- Data.Monoid.Generic
- Data.Monoid.Multiplicative
- Data.NaturalTransformation
- Data.Ord
- Data.Ord.Generic
- Data.Ordering
- Data.Ring
- Data.Ring.Generic
- Data.Semigroup
- Data.Semigroup.First
- Data.Semigroup.Generic
- Data.Semigroup.Last
- Data.Semiring
- Data.Semiring.Generic
- Data.Show
- Data.Show.Generic
- Data.Symbol
- Data.Unit
- Data.Void
- Record.Unsafe
- Type.Data.Row
- Type.Data.RowList
- Type.Proxy
profunctor-lenses
- Data.Lens.AffineTraversal
- Data.Lens.At
- Data.Lens.Common
- Data.Lens.Fold
- Data.Lens.Fold.Partial
- Data.Lens.Getter
- Data.Lens.Grate
- Data.Lens.Index
- Data.Lens.Indexed
- Data.Lens.Internal.Bazaar
- Data.Lens.Internal.Exchange
- Data.Lens.Internal.Focusing
- Data.Lens.Internal.Forget
- Data.Lens.Internal.Grating
- Data.Lens.Internal.Indexed
- Data.Lens.Internal.Market
- Data.Lens.Internal.Re
- Data.Lens.Internal.Shop
- Data.Lens.Internal.Stall
- Data.Lens.Internal.Tagged
- Data.Lens.Internal.Wander
- Data.Lens.Internal.Zipping
- Data.Lens.Iso
- Data.Lens.Iso.Newtype
- Data.Lens.Lens
- Data.Lens.Lens.Product
- Data.Lens.Lens.Tuple
- Data.Lens.Lens.Unit
- Data.Lens.Lens.Void
- Data.Lens.Prism
- Data.Lens.Prism.Coproduct
- Data.Lens.Prism.Either
- Data.Lens.Prism.Maybe
- Data.Lens.Record
- Data.Lens.Setter
- Data.Lens.Traversal
- Data.Lens.Types
- Data.Lens.Zoom
psci-support
quickcheck-laws
- Test.QuickCheck.Laws
- Test.QuickCheck.Laws.Control.Alt
- Test.QuickCheck.Laws.Control.Alternative
- Test.QuickCheck.Laws.Control.Applicative
- Test.QuickCheck.Laws.Control.Apply
- Test.QuickCheck.Laws.Control.Bind
- Test.QuickCheck.Laws.Control.Category
- Test.QuickCheck.Laws.Control.Comonad
- Test.QuickCheck.Laws.Control.Extend
- Test.QuickCheck.Laws.Control.Monad
- Test.QuickCheck.Laws.Control.MonadPlus
- Test.QuickCheck.Laws.Control.MonadZero
- Test.QuickCheck.Laws.Control.Plus
- Test.QuickCheck.Laws.Control.Semigroupoid
- Test.QuickCheck.Laws.Data.BooleanAlgebra
- Test.QuickCheck.Laws.Data.Bounded
- Test.QuickCheck.Laws.Data.BoundedEnum
- Test.QuickCheck.Laws.Data.CommutativeRing
- Test.QuickCheck.Laws.Data.DivisionRing
- Test.QuickCheck.Laws.Data.Eq
- Test.QuickCheck.Laws.Data.EuclideanRing
- Test.QuickCheck.Laws.Data.Field
- Test.QuickCheck.Laws.Data.Foldable
- Test.QuickCheck.Laws.Data.Functor
- Test.QuickCheck.Laws.Data.FunctorWithIndex
- Test.QuickCheck.Laws.Data.HeytingAlgebra
- Test.QuickCheck.Laws.Data.Monoid
- Test.QuickCheck.Laws.Data.Ord
- Test.QuickCheck.Laws.Data.Ring
- Test.QuickCheck.Laws.Data.Semigroup
- Test.QuickCheck.Laws.Data.Semiring
random
rationals
record-prefix
refs
safe-coerce
semirings
simple-json
strings
- Data.Char
- Data.Char.Gen
- Data.String.CaseInsensitive
- Data.String.CodePoints
- Data.String.CodeUnits
- Data.String.Common
- Data.String.Gen
- Data.String.NonEmpty.CaseInsensitive
- Data.String.NonEmpty.CodePoints
- Data.String.NonEmpty.CodeUnits
- Data.String.NonEmpty.Internal
- Data.String.Pattern
- Data.String.Regex
- Data.String.Regex.Flags
- Data.String.Regex.Unsafe
- Data.String.Unsafe
tailrec
transformers
- Control.Comonad.Env
- Control.Comonad.Env.Class
- Control.Comonad.Env.Trans
- Control.Comonad.Store
- Control.Comonad.Store.Class
- Control.Comonad.Store.Trans
- Control.Comonad.Traced
- Control.Comonad.Traced.Class
- Control.Comonad.Traced.Trans
- Control.Comonad.Trans.Class
- Control.Monad.Cont
- Control.Monad.Cont.Class
- Control.Monad.Cont.Trans
- Control.Monad.Error.Class
- Control.Monad.Except
- Control.Monad.Except.Trans
- Control.Monad.Identity.Trans
- Control.Monad.List.Trans
- Control.Monad.Maybe.Trans
- Control.Monad.RWS
- Control.Monad.RWS.Trans
- Control.Monad.Reader
- Control.Monad.Reader.Class
- Control.Monad.Reader.Trans
- Control.Monad.State
- Control.Monad.State.Class
- Control.Monad.State.Trans
- Control.Monad.Trans.Class
- Control.Monad.Writer
- Control.Monad.Writer.Class
- Control.Monad.Writer.Trans
type-equality
undefinable
unfoldable
unsafe-coerce
unsafe-reference
uri
- URI.AbsoluteURI
- URI.Authority
- URI.Common
- URI.Extra.MultiHostPortPair
- URI.Extra.QueryPairs
- URI.Extra.UserPassInfo
- URI.Fragment
- URI.HierarchicalPart
- URI.Host
- URI.Host.Gen
- URI.Host.IPv4Address
- URI.Host.IPv6Address
- URI.Host.RegName
- URI.HostPortPair
- URI.HostPortPair.Gen
- URI.Path
- URI.Path.Absolute
- URI.Path.NoScheme
- URI.Path.Rootless
- URI.Path.Segment
- URI.Port
- URI.Port.Gen
- URI.Query
- URI.RelativePart
- URI.RelativeRef
- URI.Scheme
- URI.Scheme.Common
- URI.URI
- URI.URIRef
- URI.UserInfo