Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Synopsis
- class (Functor t, Foldable t) => Crosswalk t where
- class (Bifunctor t, Bifoldable t) => Bicrosswalk t where
- bicrosswalk :: Align f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
- bisequenceL :: Align f => t (f a) (f b) -> f (t a b)
Crosswalk
class (Functor t, Foldable t) => Crosswalk t where Source #
Foldable functors supporting traversal through an alignable functor.
Minimal definition: crosswalk
or sequenceL
.
Laws:
crosswalk (const nil) = const nil crosswalk f = sequenceL . fmap f
Bicrosswalk
class (Bifunctor t, Bifoldable t) => Bicrosswalk t where Source #
Bifoldable bifunctors supporting traversal through an alignable functor.
Minimal definition: bicrosswalk
or bisequenceL
.
Laws:
bicrosswalk (const empty) (const empty) = const empty bicrosswalk f g = bisequenceL . bimap f g
bicrosswalk :: Align f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d) Source #
bisequenceL :: Align f => t (f a) (f b) -> f (t a b) Source #
Instances
Bicrosswalk Either Source # | |
Defined in Data.Crosswalk | |
Bicrosswalk These Source # | |
Defined in Data.Crosswalk |