| Copyright | (C) 2026 - Eitan Chatav |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Eitan Chatav <eitan.chatav@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Traversable.Homogeneous
Contents
Description
Synopsis
- class Traversable t => Homogeneous (t :: Type -> Type) where
- homogeneously :: Distributor p => p a b -> p (t a) (t b)
Homogeneous
class Traversable t => Homogeneous (t :: Type -> Type) where Source #
A class of Homogeneous
countable sums of countable products.
Minimal complete definition
Nothing
Methods
homogeneously :: Distributor p => p a b -> p (t a) (t b) Source #
Sequences actions homogeneously.
homogeneously @Maybe = optionalP
homogeneously @[] = manyP
Any Traversable & Distributive countable product
can be given a default implementation for the homogeneously method
with ditraverse.
homogeneously = ditraverse
And any user-defined homogeneous algebraic datatype has
a default instance for Homogeneous, by deriving Generic1.
default homogeneously :: (Generic1 t, Homogeneous (Rep1 t), Distributor p) => p a b -> p (t a) (t b) Source #