[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/13: gnu: Add ghc-validation.
From: |
guix-commits |
Subject: |
11/13: gnu: Add ghc-validation. |
Date: |
Tue, 2 Jul 2019 12:34:05 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 252a4d59368d3fea9c63f12592044b856af20afe
Author: Jacob MacDonald <address@hidden>
Date: Fri Jun 7 05:48:14 2019 -0500
gnu: Add ghc-validation.
* gnu/packages/haskell.scm (ghc-validation): New variable.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/packages/haskell.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 63d4360..d3ff274 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11608,6 +11608,60 @@ default)
@end itemize")
(license license:bsd-3)))
+(define-public ghc-validation
+ (package
+ (name "ghc-validation")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://hackage/package/validation/validation-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1acj7mh3581ks405xswxw6667z7y1y0slisg6jvp6chc191ji9l5"))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'add-setup-script
+ (lambda _
+ ;; The usual "Setup.hs" script is missing from the source.
+ (with-output-to-file "Setup.hs"
+ (lambda ()
+ (format #t "import Distribution.Simple~%")
+ (format #t "main = defaultMain~%"))))))))
+ (inputs
+ `(("ghc-semigroups" ,ghc-semigroups)
+ ("ghc-semigroupoids" ,ghc-semigroupoids)
+ ("ghc-bifunctors" ,ghc-bifunctors)
+ ("ghc-lens" ,ghc-lens)))
+ (native-inputs
+ `(("ghc-hedgehog" ,ghc-hedgehog)
+ ("ghc-hunit" ,ghc-hunit)))
+ (home-page "https://github.com/qfpl/validation")
+ (synopsis
+ "Data-type like Either but with an accumulating Applicative")
+ (description
+ "A data-type like Either but with differing properties and type-class
+instances.
+
+Library support is provided for this different representation, including
+@code{lens}-related functions for converting between each and abstracting over
+their similarities.
+
+The @code{Validation} data type is isomorphic to @code{Either}, but has an
+instance of @code{Applicative} that accumulates on the error side. That is to
+say, if two (or more) errors are encountered, they are appended using a
+@{Semigroup} operation.
+
+As a consequence of this @code{Applicative} instance, there is no
+corresponding @code{Bind} or @code{Monad} instance. @code{Validation} is an
+example of, \"An applicative functor that is not a monad.\"")
+ (license license:bsd-3)))
+
(define-public ghc-concurrent-output
(package
(name "ghc-concurrent-output")
- branch master updated (8b5df10 -> 2e03bbe), guix-commits, 2019/07/02
- 03/13: gnu: postgres service: More secure default permissions., guix-commits, 2019/07/02
- 04/13: gnu: Add chafa., guix-commits, 2019/07/02
- 06/13: gnu: Add ghc-ansi-terminal-0.8., guix-commits, 2019/07/02
- 08/13: gnu: ghc-ansi-terminal: Update to 0.9.1., guix-commits, 2019/07/02
- 07/13: gnu: ghc-ansi-wl-pprint: Use ghc-ansi-terminal-0.8., guix-commits, 2019/07/02
- 05/13: gnu: Add ghc-wl-pprint-annotated., guix-commits, 2019/07/02
- 11/13: gnu: Add ghc-validation.,
guix-commits <=
- 01/13: derivations: Update 'build-derivations' docstring., guix-commits, 2019/07/02
- 02/13: grafts: 'references-oracle' now takes a derivation input., guix-commits, 2019/07/02
- 09/13: gnu: Add ghc-concurrent-output., guix-commits, 2019/07/02
- 10/13: gnu: Add ghc-hedgehog., guix-commits, 2019/07/02
- 12/13: gnu: Add trivial-utf-8., guix-commits, 2019/07/02
- 13/13: gnu: Add emacs-multi-term, guix-commits, 2019/07/02