indexed-traversable: FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
This package provides three useful generalizations:
class Functor f => FunctorWithIndex i f | f -> i where imap :: (i -> a -> b) -> f a -> f b
class Foldable f => FoldableWithIndex i f | f -> i where ifoldMap :: Monoid m => (i -> a -> m) -> f a -> m
class (FunctorWithIndex i t, FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where itraverse :: Applicative f => (i -> a -> f b) -> t a -> f (t b)
This package contains instances for types in GHC boot libraries. For some additional instances see indexed-traversable-instances.
The keys package provides similar functionality,
but uses (associated) TypeFamilies
instead of FunctionalDependencies
.
Downloads
- indexed-traversable-0.1.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.1.2.1, 0.1.3, 0.1.4 |
---|---|
Change log | Changelog.md |
Dependencies | array (>=0.3.0.2 && <0.6), base (>=4.3 && <4.16), base-orphans (>=0.8.3 && <0.9), containers (>=0.4.0.0 && <0.7), generic-deriving (>=1.14 && <1.15), ghc-prim, semigroups (>=0.18.4 && <0.20), tagged (>=0.8.5 && <0.9), transformers (>=0.3.0.0 && <0.7), transformers-compat (>=0.6.6 && <0.8), void (>=0.7.2 && <0.8) [details] |
Tested with | ghc ==7.0.4 || ==7.2.2 || ==7.4.2 || ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 |
License | BSD-2-Clause |
Author | Edward Kmett |
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Revised | Revision 1 made by phadej at 2021-07-27T17:27:57Z |
Category | Data |
Source repo | head: git clone https://github.com/haskellari/indexed-traversable(indexed-traversable) |
Uploaded | by phadej at 2020-12-27T13:09:42Z |
Distributions | Arch:0.1.4, Fedora:0.1.2.1, LTSHaskell:0.1.4, NixOS:0.1.4, Stackage:0.1.4, openSUSE:0.1.4 |
Reverse Dependencies | 46 direct, 8591 indirect [details] |
Downloads | 26801 total (526 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2020-12-27 [all 1 reports] |