name: chimera version: 0.3.1.0 x-revision: 1 cabal-version: >=1.10 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 author: Bodigrim extra-source-files: README.md tested-with: GHC==8.10.1, GHC==8.8.3, 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 && <4.16, vector if flag(representable) build-depends: adjunctions, distributive, mtl cpp-options: -DDefineRepresentable exposed-modules: Data.Chimera Data.Chimera.ContinuousMapping Data.Chimera.WheelMapping other-modules: Data.Chimera.Compat Data.Chimera.FromIntegral default-language: Haskell2010 ghc-options: -Wall test-suite 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 benchmark bench build-depends: base, chimera, gauge, mtl, random type: exitcode-stdio-1.0 main-is: Bench.hs default-language: Haskell2010 hs-source-dirs: bench ghc-options: -Wall