17
0

2 Commits

3 changed files with 84 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 3 22:47:35 UTC 2025 - Peter Simons <psimons@suse.com>
- Update indexed-traversable to version 0.1.4 revision 1.
Upstream has revised the Cabal build instructions on Hackage.
-------------------------------------------------------------------
Thu May 16 07:59:00 UTC 2024 - Peter Simons <psimons@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package ghc-indexed-traversable
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,7 @@ Summary: FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
License: BSD-2-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-array-prof
@@ -87,6 +88,7 @@ This package provides the Haskell %{pkg_name} profiling library.
%prep
%autosetup -n %{pkg_name}-%{version}
cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build

75
indexed-traversable.cabal Normal file
View File

@@ -0,0 +1,75 @@
cabal-version: 1.12
name: indexed-traversable
version: 0.1.4
x-revision: 1
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.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.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.22
, 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