diff mbox series

[bug#36126] Add ghc-validation.

Message ID CACy6W0BDu==156_ecYYEgO6iO-vXO0hezi-F+PwdvAi64E_bmg@mail.gmail.com
State Accepted
Headers show
Series [bug#36126] Add ghc-validation. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Jacob MacDonald June 7, 2019, 11:51 a.m. UTC
Hello all,

The version bump pushes guix refresh over the 300-package line. Given
that and the fact that there are dependencies on older versions in the
tree, would it be better to give the newer version a special name
instead, or did I make the correct choice here?

Guix packages are a new foray for me, so I imagine something will be
wrong. Did my best to split into proper dependency order though, and
ready to touch up.

Cheers,

Jacob.

Comments

Jacob MacDonald June 22, 2019, 9:18 a.m. UTC | #1
Got no response for this, and as I haven't contributed before I'm not
sure how to proceed outside of bumping the bug after a couple weeks.

Should I fix something about the patch, close this ticket and reopen a
new one, sit and wait, or something I have not considered?

Thanks,

Jacob.
Tobias Geerinckx-Rice June 22, 2019, 6:20 p.m. UTC | #2
Jacob!

Jacob MacDonald wrote:
> Got no response for this, and as I haven't contributed before 
> I'm not
> sure how to proceed outside of bumping the bug after a couple 
> weeks.

This is absolutely fine!  Sorry about that.  We have too few 
active reviewers (I plead guilty here, too) and those who grok 
Haskell are even rarer (not me, not really…).

Sending a friendly ping after a fortnight or so certainly isn't 
frowned upon.

> Should I fix something about the patch, close this ticket and 
> reopen a
> new one, sit and wait, or something I have not considered?
           ^^^^^^^^^^^^

Let's hope your new message attracts a curious Haskeller.

Kind regards,

T G-R
Ludovic Courtès July 2, 2019, 3:57 p.m. UTC | #3
Hello Jacob,

Jacob MacDonald <jaccarmac@gmail.com> skribis:

> The version bump pushes guix refresh over the 300-package line. Given
> that and the fact that there are dependencies on older versions in the
> tree, would it be better to give the newer version a special name
> instead, or did I make the correct choice here?

I think you did it right.  :-)

> Guix packages are a new foray for me, so I imagine something will be
> wrong. Did my best to split into proper dependency order though, and
> ready to touch up.

I applied all 7 patches to ‘master’ (I added a copyright line for you).
It’s above the 300-package line as you write, but these packages build
fairly quickly, so I think it’s OK.

Thanks for the patch set, and apologies for the delay!

Ludo’.
diff mbox series

Patch

From 870736088fe74aca3902fb4d3884c88fdec84d52 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Fri, 7 Jun 2019 05:48:14 -0500
Subject: [PATCH 7/7] gnu: Add ghc-validation.

* gnu/packages/haskell.scm (ghc-validation): New variable.
---
 gnu/packages/haskell.scm | 54 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 5c4756a077..7d7568afe2 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11649,6 +11649,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")
-- 
2.21.0