[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28884] [PATCH 32/38] gnu: Add ghc-vector-builder.
From: |
rsiddharth |
Subject: |
[bug#28884] [PATCH 32/38] gnu: Add ghc-vector-builder. |
Date: |
Wed, 18 Oct 2017 03:07:52 +0000 |
* gnu/packages/haskell.scm (ghc-vector-builder): New variable.
---
gnu/packages/haskell.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 129f1792e..682f2da1e 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9981,4 +9981,61 @@ The package is intended to rapidly evolve with the
contribution from
the community, with the missing features being added with pull-requests.")
(license license:expat)))
+(define-public ghc-vector-builder
+ (package
+ (name "ghc-vector-builder")
+ (version "0.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://hackage.haskell.org/package/"
+ "vector-builder-" version "/"
+ "vector-builder-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1l6sfgd2s107zkp1qd1w6jdjcbznp31769qf99pxar087f697wvp"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-vector" ,ghc-vector)
+ ("ghc-semigroups" ,ghc-semigroups)
+ ("ghc-base-prelude" ,ghc-base-prelude)))
+ (native-inputs `(("ghc-tasty" ,ghc-tasty)
+ ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+ ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+ ("ghc-hunit" ,ghc-hunit)
+ ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
+ ("ghc-rebase" ,ghc-rebase)))
+ (home-page "https://github.com/nikita-volkov/vector-builder")
+ (synopsis "Vector builder for Haskell")
+ (description "This Haskell package provides an API for constructing
vectors.
+
+It provides the composable @code{Builder} abstraction, which has instances of
the
address@hidden and @code{Semigroup} classes.
+
+Usage:
+
+First you use the @code{Builder} abstraction to specify the structure of the
+vector. Then you execute the builder to actually produce the vector.
+
+Example:
+
+The following code shows how you can efficiently concatenate different
+datastructures into a single immutable vector:
+
address@hidden
+import qualified Data.Vector as A
+import qualified VectorBuilder.Builder as B
+import qualified VectorBuilder.Vector as C
+
+myVector :: A.Vector a -> [a] -> a -> A.Vector a
+myVector vector list element =
+ C.build builder
+ where
+ builder =
+ B.vector vector <>
+ foldMap B.singleton list <>
+ B.singleton element
address@hidden verbatim
+")
+ (license license:expat)))
+
;;; haskell.scm ends here
--
2.15.0.rc0
- [bug#28884] [PATCH 18/38] gnu: Add ghc-contravariant-extras., (continued)
- [bug#28884] [PATCH 18/38] gnu: Add ghc-contravariant-extras., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 16/38] gnu: Add ghc-base-prelude., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 20/38] gnu: Add ghc-either., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 23/38] gnu: Add ghc-crypto-api-tests., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 22/38] gnu: Add ghc-crypto-api., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 24/38] gnu: Add ghc-pretty-hex., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 25/38] gnu: Add ghc-puremd5, rsiddharth, 2017/10/17
- [bug#28884] [PATCH 26/38] gnu: Add ghc-cryptohash-md5., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 27/38] gnu: Add ghc-cryptohash-sha1., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 32/38] gnu: Add ghc-vector-builder.,
rsiddharth <=
- [bug#28884] [PATCH 28/38] gnu: Add ghc-network-info., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 29/38] gnu: Add ghc-uuid-types., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 31/38] gnu: Add ghc-rebase., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 33/38] gnu: Add ghc-foldl., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 30/38] gnu: Add ghc-uuid., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 34/38] gnu: Add ghc-mono-traversable., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 35/38] gnu: ghc-conduit: Update to 1.2.12.1., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 36/38] gnu: ghc-conduit: Fix lint error., rsiddharth, 2017/10/17