-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathchimera.cabal
124 lines (111 loc) · 3.45 KB
/
chimera.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
cabal-version: 2.2
name: chimera
version: 0.4.1.0
license: BSD-3-Clause
license-file: LICENSE
copyright: 2017-2019 Bodigrim
maintainer: andrew.lelechenko@gmail.com
author: Bodigrim
tested-with:
ghc ==9.12.1 ghc ==9.10.1 ghc ==9.8.4 ghc ==9.6.6 ghc ==9.4.8
ghc ==9.2.8 ghc ==9.0.2 ghc ==8.10.7 ghc ==8.8.4 ghc ==8.6.5
ghc ==8.4.4 ghc ==8.2.2
homepage: https://github.com/Bodigrim/chimera#readme
synopsis:
Lazy infinite streams with O(1) indexing and applications for memoization
description:
There are plenty of memoizing libraries on Hackage, but they
usually fall into two categories:
.
* Store cache as a flat array, enabling us
to obtain cached values in O(1) time, which is nice.
The drawback is that one must specify the size
of the array beforehand,
limiting an interval of inputs,
and actually allocate it at once.
* Store cache as a lazy binary tree.
Thanks to laziness, one can freely use the full range of inputs.
The drawback is that obtaining values from a tree
takes logarithmic time and is unfriendly to CPU cache,
which kinda defeats the purpose.
.
This package intends to tackle both issues,
providing a data type 'Chimera' for
lazy infinite compact streams with cache-friendly O(1) indexing.
.
Additional features include:
.
* memoization of recursive functions and recurrent sequences,
* memoization of functions of several, possibly signed arguments,
* efficient memoization of boolean predicates.
category: Data
build-type: Simple
extra-source-files: cbits/aarch64.h
extra-doc-files:
README.md
changelog.md
source-repository head
type: git
location: https://github.com/Bodigrim/chimera
flag representable
description: Define Representable instance from adjunctions package
library
exposed-modules:
Data.Chimera
Data.Chimera.ContinuousMapping
Data.Chimera.WheelMapping
hs-source-dirs: src
other-modules:
Data.Chimera.Compat
Data.Chimera.FromIntegral
Data.Chimera.Internal
Data.Chimera.Memoize
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >=4.10 && <5,
infinite-list <0.2,
primitive <0.10,
transformers <0.7,
vector <0.14,
if (arch(aarch64) && impl(ghc <9.12))
c-sources: cbits/aarch64.c
include-dirs: cbits
if flag(representable)
build-depends:
adjunctions <4.5,
distributive <0.7,
mtl <2.4,
test-suite chimera-test
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: test
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >=4.5 && <5,
chimera,
infinite-list,
QuickCheck >=2.10 && <2.16,
tasty <1.6,
tasty-hunit <0.11,
tasty-quickcheck <0.12,
tasty-smallcheck <0.9,
vector,
benchmark chimera-bench
type: exitcode-stdio-1.0
main-is: Bench.hs
hs-source-dirs: bench
other-modules:
Memoize
Read
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base,
chimera,
mtl,
random <1.4,
tasty >=1.4.2,
tasty-bench >=0.4 && <0.5,
vector,