29363df
# generated by cabal-rpm-2.1.0
822f9e5
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
Ben Boeckel 9b9d256
Ben Boeckel 19179ff
%global pkg_name bytestring-trie
9406074
%global pkgver %{pkg_name}-%{version}
Ben Boeckel 19179ff
445395b
# testsuite missing deps: tasty-smallcheck
445395b
Ben Boeckel 19179ff
Name:           ghc-%{pkg_name}
6ad68da
Version:        0.2.7.2
38e4418
Release:        %autorelease
445395b
Summary:        An efficient finite map from bytestrings to values
Ben Boeckel 19179ff
29363df
License:        BSD-3-Clause
e49533d
Url:            https://hackage.haskell.org/package/%{pkg_name}
b7391e1
# Begin cabal-rpm sources:
9406074
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
b7391e1
# End cabal-rpm sources
756bee8
b7391e1
# Begin cabal-rpm deps:
b3be130
BuildRequires:  ghc-Cabal-devel
756bee8
BuildRequires:  ghc-rpm-macros
29363df
BuildRequires:  ghc-base-devel
29363df
BuildRequires:  ghc-binary-devel
29363df
BuildRequires:  ghc-bytestring-devel
29363df
BuildRequires:  ghc-deepseq-devel
29363df
%if %{with ghc_prof}
c72cc2d
BuildRequires:  ghc-base-prof
c72cc2d
BuildRequires:  ghc-binary-prof
c72cc2d
BuildRequires:  ghc-bytestring-prof
445395b
BuildRequires:  ghc-deepseq-prof
29363df
%endif
756bee8
# End cabal-rpm deps
Ben Boeckel 19179ff
Ben Boeckel 19179ff
%description
86073ba
An efficient finite map from bytestrings to values.
86073ba
7a49116
The implementation is based on big-endian patricia trees, like "Data.IntMap".
7a49116
We first trie on the elements of "Data.ByteString" and then trie on the
7a49116
big-endian bit representation of those elements. Patricia trees have efficient
7a49116
algorithms for union and other merging operations, but they're also quick for
7a49116
lookups and insertions.
7a49116
7a49116
If you are only interested in being able to associate strings to values, then
7a49116
you may prefer the 'hashmap' package which is faster for those only needing a
7a49116
map-like structure. This package is intended for those who need the extra
7a49116
capabilities that a trie-like structure can offer (e.g., structure sharing to
7a49116
reduce memory costs for highly redundant keys, taking the submap of all keys
7a49116
with a given prefix, contextual mapping, extracting the minimum and maximum
7a49116
keys, etc.).
86073ba
86073ba
86073ba
%package devel
86073ba
Summary:        Haskell %{pkg_name} library development files
e49533d
Provides:       %{name}-static = %{version}-%{release}
c72cc2d
Provides:       %{name}-static%{?_isa} = %{version}-%{release}
9aca3d4
%if %{defined ghc_version}
86073ba
Requires:       ghc-compiler = %{ghc_version}
9aca3d4
%endif
e49533d
Requires:       %{name}%{?_isa} = %{version}-%{release}
86073ba
86073ba
%description devel
e49533d
This package provides the Haskell %{pkg_name} library development
e49533d
files.
Ben Boeckel 19179ff
Ben Boeckel 19179ff
762131a
%if %{with haddock}
762131a
%package doc
762131a
Summary:        Haskell %{pkg_name} library documentation
d71b43a
BuildArch:      noarch
b19cfb0
Requires:       ghc-filesystem
762131a
762131a
%description doc
762131a
This package provides the Haskell %{pkg_name} library documentation.
762131a
%endif
762131a
762131a
762131a
%if %{with ghc_prof}
762131a
%package prof
762131a
Summary:        Haskell %{pkg_name} profiling library
762131a
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
d71b43a
Supplements:    (%{name}-devel and ghc-prof)
762131a
762131a
%description prof
762131a
This package provides the Haskell %{pkg_name} profiling library.
762131a
%endif
762131a
762131a
Ben Boeckel 19179ff
%prep
b7391e1
# Begin cabal-rpm setup:
9406074
%setup -q -n %{pkgver}
b7391e1
# End cabal-rpm setup
Ben Boeckel 19179ff
Ben Boeckel 19179ff
Ben Boeckel 19179ff
%build
b7391e1
# Begin cabal-rpm build:
Ben Boeckel 19179ff
%ghc_lib_build
b7391e1
# End cabal-rpm build
Ben Boeckel 19179ff
Ben Boeckel 19179ff
Ben Boeckel 19179ff
%install
b7391e1
# Begin cabal-rpm install
Ben Boeckel 19179ff
%ghc_lib_install
b7391e1
# End cabal-rpm install
Ben Boeckel 19179ff
Ben Boeckel 19179ff
86073ba
%files -f %{name}.files
b7391e1
# Begin cabal-rpm files:
7a49116
%license LICENSE
b7391e1
# End cabal-rpm files
Ben Boeckel 2676b8d
86073ba
86073ba
%files devel -f %{name}-devel.files
b7391e1
%doc AUTHORS CHANGELOG README.md
Ben Boeckel 19179ff
Ben Boeckel 19179ff
762131a
%if %{with haddock}
762131a
%files doc -f %{name}-doc.files
d71b43a
%license LICENSE
762131a
%endif
762131a
762131a
762131a
%if %{with ghc_prof}
762131a
%files prof -f %{name}-prof.files
762131a
%endif
762131a
762131a
Ben Boeckel 19179ff
%changelog
38e4418
%autochangelog