summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-08-22 22:26:29 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-08-22 22:31:19 +0100
commitf1d2c1080d691306545d96aee3003dc68df5caa6 (patch)
tree65d54c75881a542d9824bcb3c724cc0bea105153 /dev-haskell/chimera
parentdev-haskell/exact-pi: new package, a depend of arithmoi-0.11 (diff)
downloadgentoo-f1d2c1080d691306545d96aee3003dc68df5caa6.tar.gz
gentoo-f1d2c1080d691306545d96aee3003dc68df5caa6.tar.bz2
gentoo-f1d2c1080d691306545d96aee3003dc68df5caa6.zip
dev-haskell/chimera: new package, a depend of arithmoi-0.11
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell/chimera')
-rw-r--r--dev-haskell/chimera/Manifest1
-rw-r--r--dev-haskell/chimera/chimera-0.3.1.0.ebuild38
-rw-r--r--dev-haskell/chimera/metadata.xml37
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-haskell/chimera/Manifest b/dev-haskell/chimera/Manifest
new file mode 100644
index 000000000000..649fe3ec37eb
--- /dev/null
+++ b/dev-haskell/chimera/Manifest
@@ -0,0 +1 @@
+DIST chimera-0.3.1.0.tar.gz 13809 BLAKE2B 64a343f84de1cd535676934c26e43994062ea24fdf27463a22b3ff1086480a277fc3f0f87905f9060bca80e46ab0a553e5091cb27065ba0e3321e62800a7756d SHA512 7f155bb3d938331760e8e06c47d67a985588e1817e8b151f6a58074d77a71ce0a70537c55ab3d97c02867d9f2a3ae2f31ed87432e833930b3be6c2f92a8947fc
diff --git a/dev-haskell/chimera/chimera-0.3.1.0.ebuild b/dev-haskell/chimera/chimera-0.3.1.0.ebuild
new file mode 100644
index 000000000000..68d9b6f55253
--- /dev/null
+++ b/dev-haskell/chimera/chimera-0.3.1.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.6.4.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Lazy infinite streams with O(1) indexing"
+HOMEPAGE="https://github.com/Bodigrim/chimera#readme"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+representable"
+
+RDEPEND="dev-haskell/vector:=[profile?]
+ >=dev-lang/ghc-8.0.1:=
+ representable? ( dev-haskell/adjunctions:=[profile?]
+ dev-haskell/distributive:=[profile?]
+ dev-haskell/mtl:=[profile?] )
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.24.0.0
+ test? ( >=dev-haskell/quickcheck-2.10
+ dev-haskell/tasty
+ dev-haskell/tasty-hunit
+ dev-haskell/tasty-quickcheck
+ dev-haskell/tasty-smallcheck )
+"
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag representable representable)
+}
diff --git a/dev-haskell/chimera/metadata.xml b/dev-haskell/chimera/metadata.xml
new file mode 100644
index 000000000000..317b99f5cc7f
--- /dev/null
+++ b/dev-haskell/chimera/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <use>
+ <flag name="representable">Define Representable instance from adjunctions package</flag>
+ </use>
+ <longdescription>
+ 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 &#39;Chimera&#39; 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.
+ </longdescription>
+</pkgmetadata>