chimera-0.3.4.0: chimera.cabal
cabal-version: 2.0
name: chimera
version: 0.3.4.0
license: BSD3
license-file: LICENSE
copyright: 2017-2019 Bodigrim
maintainer: andrew.lelechenko@gmail.com
author: Bodigrim
tested-with:
ghc ==9.8.1 ghc ==9.6.3 ghc ==9.4.7 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
ghc ==8.0.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.FromIntegral
Data.Chimera.Compat
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >=4.9 && <5,
infinite-list <0.2,
primitive <0.10,
transformers <0.7,
vector <0.14
if arch(aarch64)
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,
QuickCheck >=2.10 && <2.15,
tasty <1.6,
tasty-hunit <0.11,
tasty-quickcheck <0.11,
tasty-smallcheck <0.9,
vector
benchmark chimera-bench
type: exitcode-stdio-1.0
main-is: Bench.hs
hs-source-dirs: bench
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base,
chimera,
mtl,
random <1.3,
tasty >=1.4.2,
tasty-bench >=0.3.2 && <0.4