File: indexed-traversable.cabal

package info (click to toggle)
haskell-indexed-traversable 0.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 108 kB
  • sloc: haskell: 622; makefile: 2
file content (73 lines) | stat: -rw-r--r-- 2,061 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cabal-version:      1.12
name:               indexed-traversable
version:            0.1.4
build-type:         Simple
license:            BSD2
license-file:       LICENSE
category:           Data
maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>
author:             Edward Kmett
synopsis:           FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
description:
  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](https://hackage.haskell.org/package/indexed-traversable-instances).
  .
  The [keys](https://hackage.haskell.org/package/keys) package provides similar functionality,
  but uses (associated) @TypeFamilies@ instead of @FunctionalDependencies@.

extra-source-files: Changelog.md
tested-with:
  GHC ==8.6.5
   || ==8.8.4
   || ==8.10.7
   || ==9.0.2
   || ==9.2.8
   || ==9.4.8
   || ==9.6.5
   || ==9.8.2
   || ==9.10.1

source-repository head
  type:     git
  location: https://github.com/haskellari/indexed-traversable
  subdir:   indexed-traversable

library
  default-language: Haskell2010
  hs-source-dirs:   src
  other-modules:
    CoerceCompat
    GhcList
    WithIndex

  exposed-modules:
    Data.Foldable.WithIndex
    Data.Foldable1.WithIndex
    Data.Functor.WithIndex
    Data.Traversable.WithIndex

  build-depends:
      array         >=0.3.0.2 && <0.6
    , base          >=4.12    && <4.21
    , containers    >=0.6.0.1 && <0.8
    , transformers  >=0.5.6.0 && <0.7

  if !impl(ghc >=9.6)
    build-depends: foldable1-classes-compat >=0.1 && <0.2