Map over both arguments at the same time.
Modulebarbies-2.1.1.0Haskell2010
Barbies.Bi
- 1 type
- 10 values
- Packagebarbies-2.1.1.0
- Exports11
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceBi.hs
Functor
2 declarationsA version of btmap specialized to a single argument.
Traversable
5 declarationsA traversable bifunctor is simultaneously a TraversableT and a TraversableB.
Traverse over both arguments, first over f, then over g..
A version of bttraverse specialized to a single argument.
bttraverse1 with the arguments flipped.
Map each element to an action, evaluate these actions from left to right and ignore the results.
Map each element to a monoid, and combine the results.
Applicative
3 declarationsIf t is an ApplicativeT, the type of tpure shows that its
second argument must be a phantom-type, so there are really no
interesting types that are both ApplicativeT and ApplicativeB.
However, we can sometimes reconstruct a bi-applicative from an
ApplicativeB and a FunctorT.
Conceptually, this is like simultaneously using bpure and tpure.
A version of btpure specialized to a single argument.
Simultaneous product on both arguments.
Wrappers
1 declarationInstances12ApplicativeT, FunctorT, TraversableT, DistributiveT, ApplicativeB, DistributiveB, …
(forall (f :: k'). ApplicativeB (b f)) => ApplicativeT (Flip b)Defined in barbies-2.1.1.0 · Barbies.Bi(forall (f :: k'). FunctorB (b f)) => FunctorT (Flip b)Defined in barbies-2.1.1.0 · Barbies.Bi(forall (f :: k'). TraversableB (b f)) => TraversableT (Flip b)Defined in barbies-2.1.1.0 · Barbies.Bi(forall (f :: i). DistributiveB (b f)) => DistributiveT (Flip b)Defined in barbies-2.1.1.0 · Barbies.BiApplicativeT b => ApplicativeB (Flip b f)Defined in barbies-2.1.1.0 · Barbies.BiDistributiveT b => DistributiveB (Flip b f)Defined in barbies-2.1.1.0 · Barbies.BiFunctorT b => FunctorB (Flip b f)Defined in barbies-2.1.1.0 · Barbies.BiTraversableT b => TraversableB (Flip b f)Defined in barbies-2.1.1.0 · Barbies.BiEq (b r l) => Eq (Flip b l r)Defined in barbies-2.1.1.0 · Barbies.BiOrd (b r l) => Ord (Flip b l r)Defined in barbies-2.1.1.0 · Barbies.BiRead (b r l) => Read (Flip b l r)Defined in barbies-2.1.1.0 · Barbies.BiShow (b r l) => Show (Flip b l r)Defined in barbies-2.1.1.0 · Barbies.Bi