summaryrefslogtreecommitdiff
path: root/dev-haskell/hashtables
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/hashtables
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/hashtables')
-rw-r--r--dev-haskell/hashtables/Manifest5
-rw-r--r--dev-haskell/hashtables/hashtables-1.1.2.1.ebuild35
-rw-r--r--dev-haskell/hashtables/hashtables-1.2.1.0.ebuild36
-rw-r--r--dev-haskell/hashtables/metadata.xml108
4 files changed, 184 insertions, 0 deletions
diff --git a/dev-haskell/hashtables/Manifest b/dev-haskell/hashtables/Manifest
new file mode 100644
index 000000000000..075465897d91
--- /dev/null
+++ b/dev-haskell/hashtables/Manifest
@@ -0,0 +1,5 @@
+DIST hashtables-1.1.2.1.tar.gz 48553 BLAKE2B eff3d256a6e0bbf3ac31e6d26c43efce9bc06ba09d14b22a6a5bd1d0ea17b81912590739376a6912990501d33598e39e4f92818dceb8c89a8e57853dffbc4373 SHA512 87739d4021b705e40982e66925400eea38efd2f2a11dc46626f33d2a9c9287a5a323d93c82d6e8415aef0434350256fda80819a4bbb58ff2afee74ed755c266a
+DIST hashtables-1.2.1.0.tar.gz 53706 BLAKE2B 5bc1d17fdf80f561fa7d6e9a9010025098579694356484bdaf41ebf6e5e2a03dd6983cb653eef553fb41be99aaa3ce11b2004efe62a585b0ec34f7c4fa12cefe SHA512 2c6cd17434402ff963a1b3357e58dfab3d4b60f5a2848b5433dcbbc1705d24707eacfc36af5dfb461ab03ce678c0736f3277292677e8ab297b306bd14e797e64
+EBUILD hashtables-1.1.2.1.ebuild 1054 BLAKE2B 83ff3b4f17499c59b477e7c939d411e1c8d00a7887453672b6345809b716a5674c369eeed4e29cdda599e3e8853ccf7e4527def3b92b2c59d5a13bd85eb99d05 SHA512 04d535bb5650c804188b04f54828fa01bbcac42d5eab49ac1f32e36f8479be018546a415d1c289cb51858f42c0818be71a01396dad2fb16579c76f5646ce339b
+EBUILD hashtables-1.2.1.0.ebuild 1103 BLAKE2B ea5c6826e271c0e4bf22e89fe08d902d0e87be8d8cbc4796c396986adc50bcd03529c2fca333f64f341f803ca803930fe57c121785fb66439fab3aa24d225a40 SHA512 5e92d70af6adcf221f166e4644ea54287494e882b2699aacc297b835f880a3faf22a52b21285fb61ed4a99e7390ea2e64678e19bf5a19cecddf12f8976bbad7f
+MISC metadata.xml 4879 BLAKE2B 598ddf899f47f5ad42df5aaa560fa82be7abdc74addb41ccb98593b78a079ec4d4c99df0bf92f43bb550f993276948514f0ff0eaae01b299751a87662cf754d8 SHA512 1e2c0ad46c2da83689d968382e45a4b0d600dffbd73c1e817e95eb6bcedf4c8a352343753163fe83692a5b96afa00eac94e4d80819a2e6b04613363b0289ef9b
diff --git a/dev-haskell/hashtables/hashtables-1.1.2.1.ebuild b/dev-haskell/hashtables/hashtables-1.1.2.1.ebuild
new file mode 100644
index 000000000000..b033729e272c
--- /dev/null
+++ b/dev-haskell/hashtables/hashtables-1.1.2.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.4.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Mutable hash tables in the ST monad"
+HOMEPAGE="https://github.com/gregorycollins/hashtables"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86"
+IUSE="bounds-checking portable cpu_flags_x86_sse4_1 +unsafe-tricks"
+
+RDEPEND="dev-haskell/primitive:=[profile?]
+ >=dev-haskell/vector-0.7:=[profile?] <dev-haskell/vector-0.12:=[profile?]
+ >=dev-lang/ghc-6.10.4:=
+ >=dev-haskell/hashable-1.1:=[profile?] <dev-haskell/hashable-1.3:=[profile?]
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+"
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag bounds-checking bounds-checking) \
+ $(cabal_flag portable portable) \
+ $(cabal_flag cpu_flags_x86_sse4_1 sse41) \
+ $(cabal_flag unsafe-tricks unsafe-tricks)
+}
diff --git a/dev-haskell/hashtables/hashtables-1.2.1.0.ebuild b/dev-haskell/hashtables/hashtables-1.2.1.0.ebuild
new file mode 100644
index 000000000000..9001909211fc
--- /dev/null
+++ b/dev-haskell/hashtables/hashtables-1.2.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.6.9999
+#hackport: flags: sse42:cpu_flags_x86_sse4_2
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Mutable hash tables in the ST monad"
+HOMEPAGE="https://github.com/gregorycollins/hashtables"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="bounds-checking cpu_flags_x86_sse4_2 portable +unsafe-tricks"
+
+RDEPEND="dev-haskell/primitive:=[profile?]
+ >=dev-haskell/vector-0.7:=[profile?] <dev-haskell/vector-0.12:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+ >=dev-haskell/hashable-1.1:=[profile?] <dev-haskell/hashable-1.3:=[profile?]
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+"
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag bounds-checking bounds-checking) \
+ $(cabal_flag portable portable) \
+ $(cabal_flag cpu_flags_x86_sse4_2 sse42) \
+ $(cabal_flag unsafe-tricks unsafe-tricks)
+}
diff --git a/dev-haskell/hashtables/metadata.xml b/dev-haskell/hashtables/metadata.xml
new file mode 100644
index 000000000000..7443663f12a1
--- /dev/null
+++ b/dev-haskell/hashtables/metadata.xml
@@ -0,0 +1,108 @@
+<?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>
+ </maintainer>
+ <longdescription>
+ This package provides a couple of different implementations of mutable hash
+ tables in the ST monad, as well as a typeclass abstracting their common
+ operations, and a set of wrappers to use the hash tables in the IO monad.
+
+ /QUICK START/: documentation for the hash table operations is provided in the
+ "Data.HashTable.Class" module, and the IO wrappers (which most users will
+ probably prefer) are located in the "Data.HashTable.IO" module.
+
+ This package currently contains three hash table implementations:
+
+ 1. "Data.HashTable.ST.Basic" contains a basic open-addressing hash table
+ using linear probing as the collision strategy. On a pure speed basis it
+ should currently be the fastest available Haskell hash table
+ implementation for lookups, although it has a higher memory overhead
+ than the other tables and can suffer from long delays when the table is
+ resized because all of the elements in the table need to be rehashed.
+
+ 2. "Data.HashTable.ST.Cuckoo" contains an implementation of \"cuckoo
+ hashing\" as introduced by Pagh and Rodler in 2001 (see
+ &lt;https://en.wikipedia.org/wiki/Cuckoo_hashing&gt;). Cuckoo hashing has
+ worst-case /O(1)/ lookups and can reach a high \"load factor\", in which
+ the table can perform acceptably well even when more than 90% full.
+ Randomized testing shows this implementation of cuckoo hashing to be
+ slightly faster on insert and slightly slower on lookup than
+ "Data.Hashtable.ST.Basic", while being more space efficient by about a
+ half-word per key-value mapping. Cuckoo hashing, like the basic hash
+ table implementation using linear probing, can suffer from long delays
+ when the table is resized.
+
+ 3. "Data.HashTable.ST.Linear" contains a linear hash table (see
+ &lt;https://en.wikipedia.org/wiki/Linear_hashing&gt;), which trades some insert
+ and lookup performance for higher space efficiency and much shorter
+ delays when expanding the table. In most cases, benchmarks show this
+ table to be currently slightly faster than @Data.HashTable@ from the
+ Haskell base library.
+
+ It is recommended to create a concrete type alias in your code when using this
+ package, i.e.:
+
+ &gt; import qualified Data.HashTable.IO as H
+ &gt;
+ &gt; type HashTable k v = H.BasicHashTable k v
+ &gt;
+ &gt; foo :: IO (HashTable Int Int)
+ &gt; foo = do
+ &gt; ht &lt;- H.new
+ &gt; H.insert ht 1 1
+ &gt; return ht
+
+ Firstly, this makes it easy to switch to a different hash table implementation,
+ and secondly, using a concrete type rather than leaving your functions abstract
+ in the HashTable class should allow GHC to optimize away the typeclass
+ dictionaries.
+
+ This package accepts a couple of different cabal flags:
+
+ * @unsafe-tricks@, default /ON/. If this flag is enabled, we use some
+ unsafe GHC-specific tricks to save indirections (namely @unsafeCoerce#@
+ and @reallyUnsafePtrEquality#@. These techniques rely on assumptions
+ about the behaviour of the GHC runtime system and, although they've been
+ tested and should be safe under normal conditions, are slightly
+ dangerous. Caveat emptor. In particular, these techniques are
+ incompatible with HPC code coverage reports.
+
+ * @sse41@, default /OFF/. If this flag is enabled, we use some SSE 4.1
+ instructions (see &lt;https://en.wikipedia.org/wiki/SSE4&gt;, first available on
+ Intel Core 2 processors) to speed up cache-line searches for cuckoo
+ hashing.
+
+ * @bounds-checking@, default /OFF/. If this flag is enabled, array accesses
+ are bounds-checked.
+
+ * @debug@, default /OFF/. If turned on, we'll rudely spew debug output to
+ stdout.
+
+ * @portable@, default /OFF/. If this flag is enabled, we use only pure
+ Haskell code and try not to use unportable GHC extensions. Turning this
+ flag on forces @unsafe-tricks@ and @sse41@ /OFF/.
+
+ This package has been tested with GHC 7.0.3, on:
+
+ * a MacBook Pro running Snow Leopard with an Intel Core i5 processor,
+ running GHC 7.0.3 in 64-bit mode.
+
+ * an Arch Linux desktop with an AMD Phenom II X4 940 quad-core processor.
+
+ * a MacBook Pro running Snow Leopard with an Intel Core 2 Duo processor,
+ running GHC 6.12.3 in 32-bit mode.
+
+ Please send bug reports to
+ &lt;https://github.com/gregorycollins/hashtables/issues&gt;.
+ </longdescription>
+ <use>
+ <flag name="bounds-checking">if on, use bounds-checking array accesses</flag>
+ <flag name="portable">if on, use only pure Haskell code and no GHC extensions.</flag>
+ <flag name="unsafe-tricks">turn on unsafe GHC tricks</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gregorycollins/hashtables</remote-id>
+ </upstream>
+</pkgmetadata>