-
Notifications
You must be signed in to change notification settings - Fork 4
/
persistent-vector.cabal
79 lines (74 loc) · 2.59 KB
/
persistent-vector.cabal
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
74
75
76
77
78
79
name: persistent-vector
version: 0.2.0
synopsis: A persistent sequence based on array mapped tries
license: BSD3
license-file: LICENSE
author: Tristan Ravitch
maintainer: [email protected]
category: Data
build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md, ChangeLog.md
homepage: https://github.com/travitch/persistent-vector
bug-reports: https://github.com/travitch/persistent-vector/issues
tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.2
description:
This package provides persistent vectors based on array mapped
tries. The implementation is based on the persistent vectors used
in clojure, but in a Haskell-style API. The API is modeled after
Data.Sequence from the containers library.
.
Technically, the element-wise operations are O(log(n)), but the
underlying tree cannot be more than 7 or 8 levels deep so this is
effectively constant time.
.
One change from the clojure implementation is that this version supports
O(1) slicing, though it does cheat a little. Slices retain references
to elements that cannot be indexed. These extra references (and the space
they occupy) can be reclaimed by 'shrink'ing the slice. This seems like
a reasonable tradeoff, and, I believe, mirrors the behavior of the vector
library.
.
Highlights:
.
* O(1) append element, indexing, updates, length, and slicing
.
* Reasonably compact representation
library
default-language: Haskell2010
exposed-modules: Data.Vector.Persistent
other-modules: Data.Vector.Persistent.Array
build-depends: base ==4.*,
deepseq >= 1 && < 1.5,
transformers >= 0.3 && < 0.7
if !impl(ghc >= 8.0)
build-depends: semigroups == 0.18.*
hs-source-dirs: src
ghc-options: -Wall
if impl(ghc >= 8.0)
ghc-options: -Wcompat
test-suite pvTests
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: pvTests.hs
hs-source-dirs: tests
ghc-options: -Wall
build-depends: persistent-vector,
base == 4.*,
QuickCheck > 2.4 && < 2.15,
test-framework >= 0.6 && < 0.9,
test-framework-quickcheck2 >= 0.3 && < 0.4
benchmark pvBench
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: pvBench.hs
ghc-options: -Wall -O2
build-depends: persistent-vector,
base == 4.*,
containers,
criterion >= 1 && < 1.6,
deepseq
source-repository head
type: git
location: git://github.com/travitch/persistent-vector.git