name: chimera version: 0.3.2.0 cabal-version: 2.0 build-type: Simple license: BSD3 license-file: LICENSE copyright: 2017-2019 Bodigrim maintainer: andrew.lelechenko@gmail.com homepage: https://github.com/Bodigrim/chimera#readme category: Data synopsis: Lazy infinite streams with O(1) indexing and applications for memoization author: Bodigrim extra-source-files: README.md changelog.md tested-with: GHC==9.0.1, GHC==8.10.5, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2 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. source-repository head type: git location: https://github.com/Bodigrim/chimera flag representable description: Define Representable instance from adjunctions package default: True library build-depends: base >=4.9 && <5, vector if flag(representable) build-depends: adjunctions, distributive, mtl exposed-modules: Data.Chimera Data.Chimera.ContinuousMapping Data.Chimera.WheelMapping other-modules: Data.Chimera.Compat Data.Chimera.FromIntegral default-language: Haskell2010 ghc-options: -Wall -Wcompat test-suite chimera-test build-depends: base >=4.5 && <5, chimera, QuickCheck >=2.10, tasty, tasty-hunit, tasty-quickcheck, tasty-smallcheck, vector type: exitcode-stdio-1.0 main-is: Test.hs default-language: Haskell2010 hs-source-dirs: test ghc-options: -Wall -Wcompat benchmark chimera-bench build-depends: base, chimera, mtl, random, tasty-bench >= 0.2.4 type: exitcode-stdio-1.0 main-is: Bench.hs default-language: Haskell2010 hs-source-dirs: bench ghc-options: -Wall -Wcompat