From patchwork Fri Jun 7 11:51:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob MacDonald X-Patchwork-Id: 14256 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A422B170CB; Fri, 7 Jun 2019 16:28:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id DC2E3170C9 for ; Fri, 7 Jun 2019 16:28:07 +0100 (BST) Received: from localhost ([::1]:48806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGmh-0001Tp-OH for patchwork@mira.cbaines.net; Fri, 07 Jun 2019 11:28:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35226) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZDQg-0002FE-FA for guix-patches@gnu.org; Fri, 07 Jun 2019 07:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZDQd-0000lk-5f for guix-patches@gnu.org; Fri, 07 Jun 2019 07:53:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZDQd-0000kX-0M for guix-patches@gnu.org; Fri, 07 Jun 2019 07:53:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hZDQc-00061f-NN for guix-patches@gnu.org; Fri, 07 Jun 2019 07:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36126] [PATCH] Add ghc-validation. Resent-From: Jacob MacDonald Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Jun 2019 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36126 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36126@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155990834123110 (code B ref -1); Fri, 07 Jun 2019 11:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2019 11:52:21 +0000 Received: from localhost ([127.0.0.1]:51453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZDPw-00060g-IR for submit@debbugs.gnu.org; Fri, 07 Jun 2019 07:52:21 -0400 Received: from lists.gnu.org ([209.51.188.47]:33888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZDPr-00060U-SW for submit@debbugs.gnu.org; Fri, 07 Jun 2019 07:52:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34754) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZDPo-0000mX-Rq for guix-patches@gnu.org; Fri, 07 Jun 2019 07:52:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZDPl-00080P-W9 for guix-patches@gnu.org; Fri, 07 Jun 2019 07:52:12 -0400 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]:38680) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZDPl-0007s8-AT for guix-patches@gnu.org; Fri, 07 Jun 2019 07:52:09 -0400 Received: by mail-ot1-x333.google.com with SMTP id d17so1567847oth.5 for ; Fri, 07 Jun 2019 04:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ffMPZ2d0JrEZpKla498NI19xHK9SDm1TbDcalex9pjs=; b=nVkttMmzy9D/jzzBA71U2hYjXpBAQ7CVg/bVEgukPlbQnqoI3LnqYoCBTXG+FqQsRb w+GXeXItFmg408iNLbak3Es3gWHPiWgCn5fLHZcIZMT2khIs59zZ6Zg74Y2B0zZpkjGL YeZE1pIlbxQxVGBdYBBF44h2yLKZxOhUrlBA4XVFK4G8bjqbvBDbDdq1sZGFl4kmq/sJ etnDcNxIYzaafF7BLDzRsBgJ+AFmsyGNqMpCwQ21K17053hUG5TnQP5E7HY8Qw8nfrCM VSUxHoFBWz6pmyJCrrP27rg3e0c5zwlIXskwf7Vm1GtUudoLtAvif+n7ESjs0uNzqXS8 hG1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ffMPZ2d0JrEZpKla498NI19xHK9SDm1TbDcalex9pjs=; b=tMJIXutSH7QoOrXBkj04R1Jhg8T49vA0IoTVwLlj+Bb3J3Uf0Sgs/40J0OlBAdRkCM lDjDN6tVbHOiKEytk/FGysgsHpvlaUYWwoIAICG+mpyZXOqk0CIG506229pC9u+DQyr8 Ufkxd/s5pNBhwvcAwWBIitib4g/YYHdBt9QD6/5aIvK9oa0I1AYYeJwfd9JMJ2MQk7Q0 3C/2EOAPIRwfgFtUwHr6f+SPbd3N5F0glKkEprwSyfNIIhK4tTKug+jfQyqqujHrkxz+ vVTLBRqbeYrJqmAj+9Ijy82sVIR60VgxsuOb+AUTKDBDAA3zNH4O+hWkB0i6Rtkghc/8 FYPg== X-Gm-Message-State: APjAAAXZieoGJJN4aZmN8a+fNeMMNYRQ9p5S1MRuxFBh0Pi3A0i2PKuk TP/Z/qooeeCiUspSE9Htr2NQH8s2bfVsiz84epEr3bGO X-Google-Smtp-Source: APXvYqzx1rxuSiFH3vWn8vSrRLQu9uJzaelCCsg/5KgdGYsNlATbEy3sobfmbEVL0ZnZAKLbQ00oiAaNf+IFDjHyCO0= X-Received: by 2002:a9d:73cd:: with SMTP id m13mr8813065otk.43.1559908323501; Fri, 07 Jun 2019 04:52:03 -0700 (PDT) MIME-Version: 1.0 From: Jacob MacDonald Date: Fri, 7 Jun 2019 06:51:52 -0500 Message-ID: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Fri, 07 Jun 2019 11:12:26 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. From 870736088fe74aca3902fb4d3884c88fdec84d52 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald 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