indexed-traversable: FunctorWithIndex, FoldableWithIndex, TraversableWithIndex

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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.

Properties

Versions 0.1, 0.1.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.6), transformers-compat (>=0.6.6 && <0.7), void (>=0.7.2 && <0.8) [details]
License BSD-2-Clause
Author Edward Kmett
Maintainer Oleg Grenrus <oleg.grenrus@iki.fi>
Category Data
Source repo head: git clone https://github.com/haskellari/indexed-traversable(indexed-traversable)
Uploaded by phadej at 2020-12-27T13:08:45Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees