[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/15: gnu: Add ghc-cassava.
From: |
guix-commits |
Subject: |
12/15: gnu: Add ghc-cassava. |
Date: |
Sun, 1 Nov 2020 08:36:14 -0500 (EST) |
cbaines pushed a commit to branch master
in repository guix.
commit 1748f1b80acfb7db872721c60e3e19667e56a85b
Author: Carlo Holl <carloholl@gmail.com>
AuthorDate: Sat Oct 31 19:02:33 2020 -0700
gnu: Add ghc-cassava.
* gnu/packages/haskell-xyz.scm (ghc-cassava): New variable.
Signed-off-by: Christopher Baines <mail@cbaines.net>
---
gnu/packages/haskell-xyz.scm | 81 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index ba8a3a1..70303e2 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -1552,6 +1552,87 @@ constructor which can be parameterised by a string-like
type like:
the resulting type will be insensitive to cases.")
(license license:bsd-3)))
+(define-public ghc-cassava
+ (package
+ (name "ghc-cassava")
+ (version "0.5.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/cassava/cassava-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "01h1zrdqb313cjd4rqm1107azzx4czqi018c2djf66a5i7ajl3dk"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-attoparsec" ,ghc-attoparsec)
+ ("ghc-hashable" ,ghc-hashable)
+ ("ghc-scientific" ,ghc-scientific)
+ ("ghc-unordered-containers" ,ghc-unordered-containers)
+ ("ghc-vector" ,ghc-vector)
+ ("ghc-only" ,ghc-only)
+ ("ghc-text-short" ,ghc-text-short)
+ ("ghc-bytestring-builder" ,ghc-bytestring-builder)))
+ (native-inputs
+ `(("ghc-hunit" ,ghc-hunit)
+ ("ghc-quickcheck" ,ghc-quickcheck)
+ ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
+ ("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
+ ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
+ (arguments
+ `(#:cabal-revision
+ ("1"
+ "1ph8rf91z4nf1ryrh9s4gd1kq98jlgk2manwddkpch8k0n9xvfk4")
+ #:configure-flags '("--flags=-bytestring--lt-0_10_4")))
+ (home-page "https://github.com/haskell-hvr/cassava")
+ (synopsis "CSV parsing and encoding library")
+ (description
+ "@code{cassava} is a library for parsing and encoding
+@url{https://tools.ietf.org/html/rfc4180, RFC 4180} compliant @url{https://
+en.wikipedia.org/wiki/Comma-separated_values, comma-separated values (CSV)}
+data, which is a textual line-oriented format commonly used for exchanging
+tabular data.
+
+@code{cassava}'s API includes support for:
+
+@itemize @bullet
+
+@item
+Index-based record-conversion
+@item
+Name-based record-conversion
+@item
+Typeclass directed conversion of fields and records
+@item
+Built-in field-conversion instances for standard types
+@item
+Customizable record-conversion instance derivation via GHC generics
+@item
+Low-level @url{https://hackage.haskell.org/package/bytestring), bytestring}
+builders (see @url{https://hackage.haskell.org/package/cassava-0.5.2.0/docs/
+Data-Csv-Builder.html, Data.Csv.Builder})
+@item
+Incremental decoding and encoding API (see @url{https://hackage.haskell.org/
+package/cassava-0.5.2.0/docs/Data-Csv-Incremental.html, Data.Csv.Incremental})
+@item
+Streaming API for constant-space decoding (see
@url{https://hackage.haskell.org/
+package/cassava-0.5.2.0/docs/Data-Csv-Streaming.html, Data.Csv.Streaming})
+@end itemize
+
+Moreover, this library is designed to be easy to use; for instance, here's a
+very simple example of encoding CSV data:
+
+@verbatim
+>>> Data.Csv.encode [(\"John\",27),(\"Jane\",28)]
+\"John,27\r\nJane,28\r\n\"
+@end verbatim
+")
+ (license license:bsd-3)))
+
(define-public ghc-cborg
(package
(name "ghc-cborg")
- 07/15: gnu: Add ghc-only., (continued)
- 07/15: gnu: Add ghc-only., guix-commits, 2020/11/01
- 06/15: gnu: Add ghc-lucid., guix-commits, 2020/11/01
- 13/15: gnu: Add ghc-cassava-megaparsec., guix-commits, 2020/11/01
- 11/15: gnu: Add ghc-wizards., guix-commits, 2020/11/01
- 03/15: gnu: Add ghc-decimal., guix-commits, 2020/11/01
- 05/15: gnu: Add ghc-hspec-megaparsec., guix-commits, 2020/11/01
- 04/15: gnu: ghc-doctest: Update to 0.16.3., guix-commits, 2020/11/01
- 09/15: gnu: Add ghc-tabular., guix-commits, 2020/11/01
- 14/15: gnu: Add ghc-hledger-lib., guix-commits, 2020/11/01
- 08/15: gnu: Add ghc-text-short., guix-commits, 2020/11/01
- 12/15: gnu: Add ghc-cassava.,
guix-commits <=
- 10/15: gnu: Add ghc-uglymemo., guix-commits, 2020/11/01
- 15/15: gnu: Add hledger., guix-commits, 2020/11/01