Subject: bug#40557: closed (Re: [bug#40557] [PATCH] Add dhall.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 29 May 2020 15:02:02 +0000

Your bug report

#40557: [PATCH] Add dhall.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
40557: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40557
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#40557] [PATCH] Add dhall.
From: Leo Famulari <[email-masked]>
To: John Soo <[email-masked]>
Cc: [email-masked]
Date: Fri, 29 May 2020 11:01:31 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Fri, May 29, 2020 at 06:40:11AM -0700, John Soo wrote:
> Alright, done.  Let me know what else I can do.

Thanks! I pushed as 9ff667ea05d0807b4e6512c92914ae517b9ec755 after also
registering the patch in 'gnu/local.mk' (I had overlooked this
previously).

Subject: [PATCH] Add dhall.
From: John Soo <[email-masked]>
To: [email-masked]
Date: Sat, 11 Apr 2020 09:04:26 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix!

Dhall is a language for configuration that aims to be the best in class
for devops work.  It features strong normalization, strong static types,
imports, and more.

I hope you enjoy it!

Thanks,

John

>From 555a3b6f5fa1cdd963b50727f63a42e82e7ab0f4 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:04:11 -0700
Subject: [PATCH 01/25] gnu: Add ghc-inspection-testing.

* gnu/packages/haskell-check.scm (ghc-inspection-testing): New variable.
---
 gnu/packages/haskell-check.scm | 41 ++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm
index c6e89460ea..6defff224c 100644
--- a/gnu/packages/haskell-check.scm
+++ b/gnu/packages/haskell-check.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tonton <[email-masked]>
 ;;; Copyright © 2018 Arun Isaac <[email-masked]>
 ;;; Copyright © 2019 Timothy Sample <[email-masked]>
+;;; Copyright © 2020 John Soo <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -963,3 +964,43 @@ values (similar to @code{toEnum} but for any algebraic data type).  This
 can be used for SmallCheck-style systematic testing, QuickCheck-style
 random testing, and hybrids of the two.")
     (license license:bsd-3)))
+
+(define-public ghc-inspection-testing
+  (package
+    (name "ghc-inspection-testing")
+    (version "0.4.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/inspection-testing/"
+             "inspection-testing-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1bppz99p6ix6hah8lbr9mapl2zxgmkg9i7h6hk8wq6zf54hwz3yp"))))
+    (build-system haskell-build-system)
+    (home-page
+     "https://github.com/nomeata/inspection-testing")
+    (synopsis "GHC plugin to do inspection testing")
+    (description
+     "Some carefully crafted libraries make promises to their users beyond
+functionality and performance.
+
+Examples are: Fusion libraries promise intermediate data structures to be
+eliminated.  Generic programming libraries promise that the generic
+implementation is identical to the hand-written one.  Some libraries may
+promise allocation-free or branch-free code.
+
+Conventionally, the modus operandi in all these cases is that the library
+author manually inspects the (intermediate or final) code produced by the
+compiler.  This is not only tedious, but makes it very likely that some change,
+either in the library itself or the surrounding eco-system, breaks the
+library's promised without anyone noticing.
+
+This package provides a disciplined way of specifying such properties, and
+have them checked by the compiler.  This way, this checking can be part of the
+ususal development cycle and regressions caught early.
+
+See the documentation in \"Test.Inspection\" or the project webpage for more
+examples and more information.")
+    (license license:expat)))
-- 
2.26.0

>From 3f276166e003f2f38dffead5d0373cb3323a3216 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:05:16 -0700
Subject: [PATCH 02/25] gnu: Add ghc-data-fix.

* gnu/packages/haskell-xyz.scm (ghc-data-fix): New variable.
---
 gnu/packages/haskell-xyz.scm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d22a08e7fb..a91caed039 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -19,7 +19,7 @@
 ;;; Copyright © 2018, 2019 Gabriel Hondet <[email-masked]>
 ;;; Copyright © 2019 Robert Vollmert <[email-masked]>
 ;;; Copyright © 2019 Jacob MacDonald <[email-masked]>
-;;; Copyright © 2019 John Soo <[email-masked]>
+;;; Copyright © 2019,2020 John Soo <[email-masked]>
 ;;; Copyright © 2019 Kyle Meyer <[email-masked]>
 ;;; Copyright © 2019 Alex Griffin <[email-masked]>
 ;;; Copyright © 2020 Brett Gilio <[email-masked]>
@@ -2696,6 +2696,28 @@ package.")
   package.")
     (license license:bsd-3)))
 
+(define-public ghc-data-fix
+  (package
+    (name "ghc-data-fix")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/data-fix/"
+             "data-fix-" version ".tar.gz"))
+       (sha256
+        (base32 "14hk6hq5hdb3l5bhmzhw086jpzlvp9qbw9dzw30wlz5jbh2ihmvy"))))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/spell-music/data-fix")
+    (synopsis "Fixpoint data types")
+    (description
+     "Fixpoint types and recursion schemes.  If you define your AST as
+fixpoint type, you get fold and unfold operations for free.
+
+Thanks for contribution to: Matej Kollar, Herbert Valerio Riedel")
+    (license license:bsd-3)))
+
 (define-public ghc-data-hash
   (package
     (name "ghc-data-hash")
-- 
2.26.0

>From 15e8780c55af8530b7f722c19850ca10ad69a00b Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:06:15 -0700
Subject: [PATCH 03/25] gnu: Add ghc-cborg.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index a91caed039..d0405e6a14 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -1507,6 +1507,54 @@ 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-cborg
+  (package
+    (name "ghc-cborg")
+    (version "0.2.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/cborg/cborg-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1rdnvy0w17s70ikmbyrnwax5rvqh19l95sh8i7ipgxi23z1r0bp1"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-half" ,ghc-half)
+       ("ghc-primitive" ,ghc-primitive)))
+    (native-inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-base64-bytestring" ,ghc-base64-bytestring)
+       ("ghc-base16-bytestring" ,ghc-base16-bytestring)
+       ("ghc-fail" ,ghc-fail)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-vector" ,ghc-vector)))
+    (home-page "http://hackage.haskell.org/package/cborg")
+    (synopsis "Concise Binary Object Representation")
+    (description
+     "This package (formerly binary-serialise-cbor) provides an
+efficient implementation of the Concise Binary Object
+Representation (CBOR), as specified by RFC 7049 at
+https://tools.ietf.org/html/rfc7049.
+
+If you are looking for a library for serialisation of Haskell values, have a
+look at the @url{https://hackage.haskell.org/package/serialise} package, which
+is built upon this library.
+
+An implementation of the standard bijection between CBOR and JSON is provided
+by the @url{https://hackage.haskell.org/package/cborg-json} package.
+
+Also see @code{https://hackage.haskell.org/package/cbor-tool} for a convenient
+command-line utility for working with CBOR data.")
+    (license license:bsd-3)))
+
 (define-public ghc-cereal
   (package
     (name "ghc-cereal")
-- 
2.26.0

>From 4f5beda649444bd373ea3b122cb66022146f7e4e Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:07:44 -0700
Subject: [PATCH 04/25] gnu: Add ghc-cborg-json.

* gnu/packages/haskell-xyz.scm (ghc-cborg-json): New variable.
---
 gnu/packages/haskell-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d0405e6a14..6dbbdc4c2a 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -1555,6 +1555,34 @@ Also see @code{https://hackage.haskell.org/package/cbor-tool} for a convenient
 command-line utility for working with CBOR data.")
     (license license:bsd-3)))
 
+(define-public ghc-cborg-json
+  (package
+    (name "ghc-cborg-json")
+    (version "0.2.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/cborg-json/cborg-json-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32 "0ysilz7rrjk94sqr3a61s98hr9qfi1xg13bskmlpc6mpgi2s4s5b"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-aeson-pretty" ,ghc-aeson-pretty)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-cborg" ,ghc-cborg)))
+    (home-page "https://github.com/well-typed/cborg")
+    (synopsis "A library for encoding JSON as CBOR")
+    (description
+     "This package implements the bijection between JSON and CBOR
+defined in the CBOR specification, RFC 7049.")
+    (license license:bsd-3)))
+
 (define-public ghc-cereal
   (package
     (name "ghc-cereal")
-- 
2.26.0

>From f2f36110e94cd860bf4c6f32080dcf5bdd51c3d0 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:08:27 -0700
Subject: [PATCH 05/25] gnu: Add ghc-dotgen.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 6dbbdc4c2a..19933f7419 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -3314,6 +3314,30 @@ It is modeled after doctest for Python, see
 @uref{https://docs.python.org/library/doctest.html, the Doctest website}.")
     (license license:expat)))
 
+(define-public ghc-dotgen
+  (package
+    (name "ghc-dotgen")
+    (version "0.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/dotgen/dotgen-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "148q93qsmqgr5pzdwvpjqfd6bdm1pwzcp2rblfwswx2x8c5f43fg"))))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/ku-fpg/dotgen")
+    (synopsis
+     "Simple interface for building .dot graph files")
+    (description
+     "This package provides a simple interface for building .dot graph
+files, for input into the dot and graphviz tools.  It includes a
+monadic interface for building graphs.")
+    (license license:bsd-3)))
+
 (define-public ghc-double-conversion
   (package
     (name "ghc-double-conversion")
-- 
2.26.0

>From 7b2bd1d3397d33b203c1270503d69b4f703c5fd7 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:09:02 -0700
Subject: [PATCH 06/25] gnu: Add ghc-generic-random.

* gnu/packages/haskell-xyz.scm (ghc-generic-random): New variable.
---
 gnu/packages/haskell-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 19933f7419..1f1bba2f04 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -4453,6 +4453,46 @@ specific Windows, Mac, and Linux file system event notification.")
 deriving mechanism in Haskell to arbitrary classes.")
     (license license:bsd-3)))
 
+(define-public ghc-generic-random
+  (package
+    (name "ghc-generic-random")
+    (version "1.2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/generic-random/"
+             "generic-random-" version ".tar.gz"))
+       (sha256
+        (base32 "130lmblycxnpqbsl7vf6a90zccibnvcb5zaclfajcn3by39007lv"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
+    (native-inputs
+     `(("ghc-inspection-testing" ,ghc-inspection-testing)))
+    (arguments
+     `(#:cabal-revision
+       ("1" "1d0hx41r7yq2a86ydnfh2fv540ah8cz05l071s2z4wxcjw0ymyn4")))
+    (home-page
+     "https://github.com/lysxia/generic-random")
+    (synopsis
+     "Generic random generators for QuickCheck")
+    (description
+     "Derive instances of @code{Arbitrary} for QuickCheck, with various options
+to customize implementations.
+
+Automating the arbitrary boilerplate also ensures that when a type changes to
+have more or fewer constructors, then the generator either fixes itself to
+generate that new case (when using the uniform distribution) or causes a
+compilation error so you remember to fix it (when using an explicit
+distribution).
+
+This package also offers a simple (optional) strategy to ensure termination
+for recursive types: make @code{Test.QuickCheck.Gen}'s size parameter decrease
+at every recursive call; when it reaches zero, sample directly from a
+trivially terminating generator given explicitly (@code{genericArbitraryRec}
+and @code{withBaseCase}) or implicitly (@code{genericArbitrary'}).")
+    (license license:expat)))
+
 (define-public ghc-generics-sop
   (package
     (name "ghc-generics-sop")
-- 
2.26.0

>From 8e366025dbf6a837edf9cd6703d6fb22aa3e9bd6 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:09:59 -0700
Subject: [PATCH 07/25] gnu: Add ghc-text-manipulate.

* gnu/packages/haskell-xyz.scm (ghc-text-manipulate): New variable.

fix text-manipulate.
---
 gnu/packages/haskell-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 1f1bba2f04..c1b6bba60c 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11876,6 +11876,44 @@ instances for strict and lazy text types for versions older than 1.2.1 of the
 text package.")
     (license license:bsd-2)))
 
+(define-public ghc-text-manipulate
+  (package
+    (name "ghc-text-manipulate")
+    (version "0.2.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/text-manipulate"
+             "/text-manipulate-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0bwxyjj3ll45srxhsp2ihikgqglvjc6m02ixr8xpvyqwkcfwgsg0"))))
+    (build-system haskell-build-system)
+    (native-inputs
+     `(("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
+    (home-page
+     "https://github.com/brendanhay/text-manipulate")
+    (synopsis
+     "Case conversion, word boundary manipulation, and textual subjugation")
+    (description
+     "Manipulate identifiers and structurally non-complex pieces of text by
+delimiting word boundaries via a combination of whitespace,
+control-characters, and case-sensitivity.
+
+Has support for common idioms like casing of programmatic variable names,
+taking, dropping, and splitting by word, and modifying the first character of
+a piece of text.
+
+Caution: this library makes heavy use of the text library's internal loop
+optimisation framework.  Since internal modules are not guaranteed to have a
+stable API there is potential for build breakage when the text dependency is
+upgraded.  Consider yourself warned!")
+    (license license:mpl2.0)))
+
 (define-public ghc-text-metrics
   (package
     (name "ghc-text-metrics")
-- 
2.26.0

>From f7110093c7ba1b7db7e5c9bf6299d8e9f844a0a0 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:10:29 -0700
Subject: [PATCH 08/25] gnu: Add ghc-spoon.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index c1b6bba60c..87f5d56dc1 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11065,6 +11065,37 @@ internal state).")
     (native-inputs '())
     (properties '((hidden? #t)))))
 
+(define-public ghc-spoon
+  (package
+    (name "ghc-spoon")
+    (version "0.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/spoon/spoon-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1m41k0mfy6fpfrv2ym4m5jsjaj9xdfl2iqpppd3c4d0fffv51cxr"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1"
+        "09s5jjcsg4g4qxchq9g2l4i9d5zh3rixpkbiysqcgl69kj8mwv74")))
+    (home-page
+     "http://hackage.haskell.org/package/spoon")
+    (synopsis
+     "Catch errors thrown from pure computations")
+    (description
+     "Takes an error-throwing expression and puts it back in the Maybe it
+belongs in.
+
+Note that this suffers from the
+@url{https://ghc.haskell.org/trac/ghc/ticket/5902}.  Buyer beware.")
+    (license license:bsd-3)))
+
 (define-public ghc-statevar
   (package
     (name "ghc-statevar")
-- 
2.26.0

>From 0e8fe59109c85ab5152c4a6cc95129c3b81e1ead Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:11:00 -0700
Subject: [PATCH 09/25] gnu: Add ghc-special-values.

* gnu/packages/haskell-xyz.scm (ghc-special-values): New variable.
---
 gnu/packages/haskell-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 87f5d56dc1..2712d0b63a 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10992,6 +10992,32 @@ core of @url{https://hackage.haskell.org/package/generics-sop,
 generics-sop}.")
     (license license:bsd-3)))
 
+(define-public ghc-special-values
+  (package
+    (name "ghc-special-values")
+    (version "0.1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/special-values/"
+             "special-values-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1kkdw2c4d2hha99v9f89ahmifjxp7fxmxyfwq9a8xk6s0h9xs51w"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-scientific" ,ghc-scientific)
+       ("ghc-ieee754" ,ghc-ieee754)
+       ("ghc-nats" ,ghc-nats)))
+    (home-page
+     "https://github.com/minad/special-values#readme")
+    (synopsis "Typeclass providing special values")
+    (description
+     "Special values are provided by a SpecialValues typeclass.  Those can be
+used for example by QuickCheck, see quickcheck-special."  )
+    (license license:expat)))
+
 (define-public ghc-split
   (package
     (name "ghc-split")
-- 
2.26.0

>From 8d8e768639a1b6b57d3a34be95c3b64fff264dc4 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:11:37 -0700
Subject: [PATCH 10/25] gnu: Add ghc-serialise.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 2712d0b63a..f610fa7bf0 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10651,6 +10651,56 @@ semigroup.")
        ("ghc-hashable" ,ghc-hashable-bootstrap)))
     (properties '((hidden? #t)))))
 
+(define-public ghc-serialise
+  (package
+    (name "ghc-serialise")
+    (version "0.2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/serialise/serialise-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "19ary6ivzk8z7wcxhm860qmh7pwqj0qjqzav1h42y85l608zqgh4"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-cborg" ,ghc-cborg)
+       ("ghc-half" ,ghc-half)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-primitive" ,ghc-primitive)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)))
+    (arguments
+     `(#:cabal-revision
+       ("1" "1rknhad1i8bpknsnphmcmb6dnb48c2p2c13ia2qqch3hkhsvfpr6")))
+    (home-page "https://github.com/well-typed/cborg")
+    (synopsis "Binary serialisation library for Haskell values")
+    (description
+     "This package (formerly binary-serialise-cbor) provides pure,
+efficient serialization of Haskell values directly into ByteStrings for
+storage or transmission purposes.  By providing a set of type class instances,
+you can also serialise any custom data type you have as well.
+
+The underlying binary format used is the 'Concise Binary Object
+Representation', or CBOR, specified in RFC 7049.  As a result, serialised
+Haskell values have implicit structure outside of the Haskell program itself,
+meaning they can be inspected or analyzed without custom tools.
+
+An implementation of the standard bijection between CBOR and JSON is
+provided by the https://hackage.haskell.org/package/cborg-json
+package.  Also see https://hackage.haskell.org/package/cbor-tool for a
+convenient command-line utility for working with CBOR data.")
+    (license license:bsd-3)))
+
 (define-public ghc-setenv
   (package
     (name "ghc-setenv")
-- 
2.26.0

>From ea8f815d0665626cd56d4a9dadbcf5cd0feb839c Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:12:25 -0700
Subject: [PATCH 11/25] gnu: Add ghc-pretty-simple.

* gnu/packages/haskell-xyz.scm (ghc-pretty-simple): New variable.
---
 gnu/packages/haskell-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index f610fa7bf0..f5d3140d66 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -9284,6 +9284,33 @@ complex generic values into an interactive Html page, for easier
 examination.")
     (license license:expat)))
 
+(define-public ghc-pretty-simple
+  (package
+    (name "ghc-pretty-simple")
+    (version "2.2.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/pretty-simple/"
+             "pretty-simple-" version ".tar.gz"))
+       (sha256
+        (base32 "0wsi9235ihm15s145lxi7325vv2k4bhighc5m88kn1lk0pl81aqq"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-glob" ,ghc-glob)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-aeson" ,ghc-aeson)))
+    (native-inputs
+     `(("ghc-doctest" ,ghc-doctest)))
+    (home-page "https://github.com/cdepillabout/pretty-simple")
+    (synopsis "Pretty printer for data types with a 'Show' instance")
+    (description
+     "Pretty-simple is a pretty printer for Haskell data types that have a
+Show instance.")
+    (license license:bsd-3)))
+
 (define-public ghc-primitive
   (package
     (name "ghc-primitive")
-- 
2.26.0

>From 24e790c32d6c59defae3c1370ca874f48ab3b084 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:13:20 -0700
Subject: [PATCH 12/25] gnu: Add ghc-pgp-wordlist.

* gnu/packages/haskell-xyz.scm (ghc-pgp-wordlist): New variable.
---
 gnu/packages/haskell-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index f5d3140d66..168a3c0434 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -9075,6 +9075,45 @@ the persistent interface, not for users of the persistent suite of database
 libraries.")
     (license license:expat)))
 
+(define-public ghc-pgp-wordlist
+  (package
+    (name "ghc-pgp-wordlist")
+    (version "0.1.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/pgp-wordlist/pgp-wordlist-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "15g6qh0fb7kjj3l0w8cama7cxgnhnhybw760md9yy7cqfq15cfzg"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-hunit" ,ghc-hunit)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-doctest" ,ghc-doctest)))
+    (home-page
+     "https://github.com/quchen/pgp-wordlist")
+    (synopsis
+     "Translate between binary data and a human-readable collection of words")
+    (description
+     "The PGP Word List consists of two phonetic alphabets, each with one word
+per possible byte value.  A string of bytes is translated with these
+alphabets, alternating between them at each byte.
+
+The PGP words corresponding to the bytes 5B 1D CA 6E are \"erase breakaway
+spellbind headwaters\", for example.
+
+For further information, see
+@url{http://en.wikipedia.org/wiki/PGP_word_list}.")
+    (license license:bsd-3)))
+
 (define-public ghc-pipes
   (package
     (name "ghc-pipes")
-- 
2.26.0

>From 0858a20e50435dc5550b800698e24b9bf2e25eef Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:13:54 -0700
Subject: [PATCH 13/25] gnu: Add ghc-optional-args.

* gnu/packages/haskell-xyz.scm (ghc-optional-args): New variable.
---
 gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 168a3c0434..8a18382bee 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -8310,6 +8310,29 @@ replay capababilities, implementing fast parser monads, designing monadic
 DSLs, etc.")
     (license license:bsd-3)))
 
+(define-public ghc-optional-args
+  (package
+    (name "ghc-optional-args")
+    (version "1.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/optional-args/optional-args-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1r5hhn6xvc01grggxdyy48daibwzi0aikgidq0ahpa6bfynm8d1f"))))
+    (build-system haskell-build-system)
+    (home-page
+     "http://hackage.haskell.org/package/optional-args")
+    (synopsis "Optional function arguments")
+    (description
+     "This library provides a type for specifying @code{Optional} function
+arguments.")
+    (license license:bsd-3)))
+
 (define-public ghc-options
   (package
     (name "ghc-options")
-- 
2.26.0

>From e4f5c29a0669d1e6dd0174243413a598ff2223ae Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:14:59 -0700
Subject: [PATCH 14/25] gnu: Add ghc-turtle.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 8a18382bee..c824b616d8 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -12684,6 +12684,69 @@ generating functions similar to those in @code{Data.List} for tuples of
 statically known size.")
     (license license:bsd-3)))
 
+(define-public ghc-turtle
+  (package
+    (name "ghc-turtle")
+    (version "1.5.15")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/turtle/turtle-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0yckgsc2a4g5x867gni80ldp226bsnhncfbil4ql6v2zwm4r8p7f"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
+       ("ghc-async" ,ghc-async)
+       ("ghc-clock" ,ghc-clock)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-foldl" ,ghc-foldl)
+       ("ghc-hostname" ,ghc-hostname)
+       ("ghc-managed" ,ghc-managed)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-system-filepath" ,ghc-system-filepath)
+       ("ghc-system-fileio" ,ghc-system-fileio)
+       ("ghc-streaming-commons" ,ghc-streaming-commons)
+       ("ghc-temporary" ,ghc-temporary)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-optional-args" ,ghc-optional-args)
+       ("ghc-unix-compat" ,ghc-unix-compat)))
+    (native-inputs
+     `(("ghc-doctest" ,ghc-doctest)
+       ("ghc-fail" ,ghc-fail)))
+    (arguments
+     `(#:cabal-revision
+       ("1" "02q1rv7zx31xz9wnmcqwd4w3iw7623p07iyi21zr0cqlignic5pg")))
+    (home-page
+     "http://hackage.haskell.org/package/turtle")
+    (synopsis "Shell programming, Haskell-style")
+    (description
+     "Turtle is a reimplementation of the Unix command line environment in
+Haskell so that you can use Haskell as both a shell and a scripting
+language.  Features include:
+
+@itemize
+@item Batteries included: Command an extended suite of predefined utilities.
+@item Interoperability: You can still run external shell commands.
+@item Portability: Works on Windows, OS X, and Linux.
+@item Exception safety: Safely acquire and release resources.
+@item Streaming: Transform or fold command output in constant space.
+@item Patterns: Use typed regular expressions that can parse structured values.
+@item Formatting: Type-safe printf-style text formatting.
+@item Modern: Supports text and system-filepath.
+@end itemize
+
+Read \"Turtle.Tutorial\" for a detailed tutorial or \"Turtle.Prelude\" for a
+quick-start guide.  Turtle is designed to be beginner-friendly, but as a
+result lacks certain features, like tracing commands.  If you feel comfortable
+using turtle then you should also check out the Shelly library which provides
+similar functionality.")
+    (license license:bsd-3)))
+
 (define-public ghc-typed-process
   (package
     (name "ghc-typed-process")
-- 
2.26.0

>From fac9177f14361df3e8af0582f98170883ab802c4 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:15:54 -0700
Subject: [PATCH 15/25] gnu: Add ghc-managed.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index c824b616d8..22850faf97 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -7109,6 +7109,42 @@ With it, you can determine the type of a file by examining its contents rather
 than its name.")
     (license license:bsd-3)))
 
+(define-public ghc-managed
+  (package
+    (name "ghc-managed")
+    (version "1.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/managed/managed-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1kbrw99yh5x5blykmx2n88mplbbi4ss1ij5j17b7asw6q0ihm9zi"))))
+    (build-system haskell-build-system)
+    (home-page "http://hackage.haskell.org/package/managed")
+    (synopsis "Monad for managed values")
+    (description
+     "In Haskell you very often acquire values using the with... idiom using
+functions of type (a -> IO r) -> IO r.  This idiom forms a Monad, which is a
+special case of the ContT monad (from transformers) or the Codensity
+monad (from kan-extensions).  The main purpose behind this package is to
+provide a restricted form of these monads specialized to this unusually common
+case.
+
+The reason this package defines a specialized version of these types
+is to:
+
+@itemize
+@item be more beginner-friendly,
+@item simplify inferred types and error messages, and:
+@item provide some additional type class instances that would otherwise be
+orphan instances
+@end itemize")
+    (license license:bsd-3)))
+
 (define-public ghc-markdown-unlit
   (package
     (name "ghc-markdown-unlit")
-- 
2.26.0

>From 30fab7f6acae5458bf2c92d6eba8b20d24b96df4 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:17:48 -0700
Subject: [PATCH 16/25] gnu: Add ghc-lens-family-core.

* gnu/packages/haskell-xyz.scm (ghc-lens-family-core): New variable.
---
 gnu/packages/haskell-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 22850faf97..e9e8ee75eb 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -6632,6 +6632,42 @@ of getters, folds, isomorphisms, traversals, setters and lenses and their
 indexed variants.")
     (license license:bsd-3)))
 
+(define-public ghc-lens-family-core
+  (package
+    (name "ghc-lens-family-core")
+    (version "1.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/lens-family-core/lens-family-core-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "009rf10pj1cb50v44cc1pq7qvfrmkkk9dikahs9qmvbvgl3mykwi"))))
+    (build-system haskell-build-system)
+    (home-page
+     "http://hackage.haskell.org/package/lens-family-core")
+    (synopsis "Haskell 98 Lens Families")
+    (description
+     "This package provides first class functional references.  In addition to
+the usual operations of getting, setting and composition, plus integration
+with the state monad, lens families provide some unique features:
+
+@itemize
+@item Polymorphic updating
+@item Traversals
+@item Cast projection functions to read-only lenses
+@item Cast @code{toList} functions to read-only traversals
+@item Cast semantic editor combinators to modify-only traversals
+@end itemize
+
+For optimal first-class support use the lens-family package with rank 2/rank N
+polymorphism.  @code{Lens.Family.Clone} allows for first-class support of
+lenses and traversals for those who require Haskell 98.")
+    (license license:bsd-3)))
+
 (define-public ghc-libffi
   (package
     (name "ghc-libffi")
-- 
2.26.0

>From 68762783214e0e024a06bc76af273a5dac0ab4af Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:18:37 -0700
Subject: [PATCH 17/25] gnu: Add ghc-prettyprinter.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index e9e8ee75eb..28feb44711 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -9370,6 +9370,35 @@ provides the pretty printing class and instances for the Prelude
 types.")
     (license license:bsd-3)))
 
+(define-public ghc-prettyprinter
+  (package
+    (name "ghc-prettyprinter")
+    (version "1.2.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/prettyprinter/prettyprinter-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32 "1p9c3q55hba4c0zyxc624g5df7wgsclpsmd8wqpdnmib882q9d1v"))))
+    (build-system haskell-build-system)
+    (native-inputs
+     `(("ghc-doctest" ,ghc-doctest)
+       ("ghc-pgp-wordlist" ,ghc-pgp-wordlist)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
+    (home-page "https://github.com/quchen/prettyprinter")
+    (synopsis
+     "Modern, easy to use, well-documented, extensible pretty-printer")
+    (description
+     "A prettyprinter/text rendering engine.  Easy to use, well-documented,
+ANSI terminal backend exists, HTML backend is trivial to implement, no name
+clashes, @code{Text}-based, extensible.")
+    (license license:bsd-2)))
+
 (define-public ghc-pretty-hex
   (package
     (name "ghc-pretty-hex")
-- 
2.26.0

>From 277b6a6bf0ba7ebcead9a6fb01a86f17c1f68b12 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:19:29 -0700
Subject: [PATCH 18/25] gnu: Add ghc-repline.

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 28feb44711..38010a015e 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10129,6 +10129,28 @@ inspired by libtre.")
      "This provides an extra text interface for regex-tdfa.")
     (license license:bsd-3)))
 
+(define-public ghc-repline
+  (package
+    (name "ghc-repline")
+    (version "0.2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/repline/repline-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1ph21kbbanlcs8n5lwk16g9vqkb98mkbz5mzwrp8j2rls2921izc"))))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/sdiehl/repline")
+    (synopsis "Haskeline wrapper for GHCi-like REPL interfaces")
+    (description
+     "Haskeline wrapper for GHCi-like REPL interfaces.  Composable with
+normal mtl transformers.")
+    (license license:expat)))
+
 (define-public ghc-rerebase
   (package
     (name "ghc-rerebase")
-- 
2.26.0

>From f17cebf2a45f44705c27ff423547d69f9cd62424 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:19:59 -0700
Subject: [PATCH 19/25] gnu: Add ghc-haskeline-0.8.

* gnu/packages/haskell-xyz.scm (ghc-haskeline-0.8): New variable.
---
 gnu/packages/haskell-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 38010a015e..58b72c21f0 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -5246,6 +5246,37 @@ monad, as well as a typeclass abstracting their common operations, and
 a set of wrappers to use the hash tables in the IO monad.")
     (license license:bsd-3)))
 
+(define-public ghc-haskeline-0.8
+  (package
+    (name "ghc-haskeline")
+    (version "0.8.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/haskeline/haskeline-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0gqsa5s0drim9m42hv4wrq61mnvcdylxysfxfw3acncwilfrn9pb"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-exceptions" ,ghc-exceptions)))
+    (native-inputs `(("ghc-hunit" ,ghc-hunit)))
+    ;; FIXME: Tests failing
+    (arguments `(#:tests? #f))
+    (home-page "https://github.com/judah/haskeline")
+    (synopsis
+     "Command-line interface for user input, written in Haskell")
+    (description
+     "Haskeline provides a user interface for line input in command-line
+programs.  This library is similar in purpose to readline, but since it is
+written in Haskell it is (hopefully) more easily used in other Haskell
+programs.
+
+Haskeline runs both on POSIX-compatible systems and on Windows.")
+    (license license:bsd-3)))
+
 (define-public ghc-haskell-lexer
   (package
     (name "ghc-haskell-lexer")
-- 
2.26.0

>From f88f47da681be2f4cec5402223b422b6333406bb Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:20:34 -0700
Subject: [PATCH 20/25] gnu: Add ghc-repline-0.3.

* gnu/packages/haskell-xyz.scm (ghc-repline-0.3): New variable.
---
 gnu/packages/haskell-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 58b72c21f0..103dbe0219 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10182,6 +10182,24 @@ inspired by libtre.")
 normal mtl transformers.")
     (license license:expat)))
 
+(define-public ghc-repline-0.3
+  (package
+    (inherit ghc-repline)
+    (version "0.3.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/repline/repline-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0niihfyggg2qisadg7w49cr5k5qyyynia93iip0ng2bbmzwi88g8"))))
+    (inputs
+     `(("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-haskeline" ,ghc-haskeline-0.8)))))
+
 (define-public ghc-rerebase
   (package
     (name "ghc-rerebase")
-- 
2.26.0

>From 0970fa70ddeff2946d1c341a023a066508abb218 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:21:06 -0700
Subject: [PATCH 21/25] gnu: Add ghc-prettyprinter-1.6.

* gnu/packages/haskell-xyz.scm (ghc-prettyprinter-1.6): New variable.
---
 gnu/packages/haskell-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 103dbe0219..d613e87e23 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -9430,6 +9430,23 @@ ANSI terminal backend exists, HTML backend is trivial to implement, no name
 clashes, @code{Text}-based, extensible.")
     (license license:bsd-2)))
 
+(define-public ghc-prettyprinter-1.6
+  (package
+    (inherit ghc-prettyprinter)
+    (version "1.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/prettyprinter/prettyprinter-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32 "10fphxh8lvdaw7i8jyllwmj87w02db92mf99zfw5vddp9mv6b5rz"))))
+    (inputs
+     `(("ghc-quickckeck-instances" , ghc-quickcheck-instances)
+       ,@(package-inputs ghc-prettyprinter)))))
+
 (define-public ghc-pretty-hex
   (package
     (name "ghc-pretty-hex")
-- 
2.26.0

>From 8f03a8be3517d3d9236a8727781783b4363a796f Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:21:32 -0700
Subject: [PATCH 22/25] gnu: Add ghc-prettyprinter-ansi-terminal.

* gnu/packages/haskell-xyz.scm (ghc-prettyprinter-ansi-terminal): New variable.
---
 gnu/packages/haskell-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d613e87e23..c09d50982a 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -9447,6 +9447,30 @@ clashes, @code{Text}-based, extensible.")
      `(("ghc-quickckeck-instances" , ghc-quickcheck-instances)
        ,@(package-inputs ghc-prettyprinter)))))
 
+(define-public ghc-prettyprinter-ansi-terminal
+  (package
+    (name "ghc-prettyprinter-ansi-terminal")
+    (version "1.1.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/prettyprinter-ansi-terminal/"
+             "prettyprinter-ansi-terminal-" version ".tar.gz"))
+       (sha256
+        (base32 "0ha6vz707qzb5ky7kdsnw2zgphg2dnxrpbrxy8gaw119vwhb9q6k"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-prettyprinter" ,ghc-prettyprinter-1.6)))
+    (native-inputs `(("ghc-doctest" ,ghc-doctest)))
+    (home-page
+     "https://github.com/quchen/prettyprinter")
+    (synopsis
+     "ANSI terminal backend for the prettyprinter package")
+    (description "ANSI terminal backend for the prettyprinter package.")
+    (license license:bsd-2)))
+
 (define-public ghc-pretty-hex
   (package
     (name "ghc-pretty-hex")
-- 
2.26.0

>From e8814bf4c06f1814fdf5820694fb6e97c913cf4c Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:22:09 -0700
Subject: [PATCH 23/25] gnu: Add ghc-generic-random-1.3.0.1.

* gnu/packages/haskell-xyz.scm (ghc-generic-random-1.3.0.1): New variable.
---
 gnu/packages/haskell-xyz.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index c09d50982a..36f25bf297 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -4493,6 +4493,20 @@ trivially terminating generator given explicitly (@code{genericArbitraryRec}
 and @code{withBaseCase}) or implicitly (@code{genericArbitrary'}).")
     (license license:expat)))
 
+(define-public ghc-generic-random-1.3.0.1
+  (package
+    (inherit ghc-generic-random)
+    (version "1.3.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/generic-random/"
+             "generic-random-" version ".tar.gz"))
+       (sha256
+        (base32 "0d9w7xcmsb31b95fr9d5jwbsajcl1yi4347dlbw4bybil2vjwd7k"))))
+    (arguments '())))
+
 (define-public ghc-generics-sop
   (package
     (name "ghc-generics-sop")
-- 
2.26.0

>From 26bd7954cea713c45c35667aeb0787efe8f69cc8 Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:22:42 -0700
Subject: [PATCH 24/25] gnu: Add ghc-atomic-write-0.2.0.7.

* gnu/packages/haskell-xyz.scm (ghc-atomic-write-0.2.0.7): New variable.
---
 gnu/packages/haskell-xyz.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 36f25bf297..d7d0a01942 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -539,6 +539,21 @@ will destroy the permissions on the original file.  This library preserves
 permissions while atomically writing to a file.")
     (license license:expat)))
 
+(define-public ghc-atomic-write-0.2.0.7
+  (package
+    (inherit ghc-atomic-write)
+    (version "0.2.0.7")
+    (source
+     (origin
+       (inherit (package-source ghc-atomic-write))
+       (uri (string-append
+             "https://hackage.haskell.org/package/atomic-write/atomic-write-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "03cn3ii74h0w3g4h78xsx9v2sn58r3qsr2dbdwq340xwhiwcgxdm"))))))
+
 (define-public ghc-attoparsec
   (package
     (name "ghc-attoparsec")
-- 
2.26.0

>From 97163f01cb31dd70e09e0245630d1f7babe5251c Mon Sep 17 00:00:00 2001
From: John Soo <[email-masked]>
Date: Fri, 10 Apr 2020 21:01:46 -0700
Subject: [PATCH 25/25] gnu: Add dhall.

* gnu/packages/dhall.scm (dhall): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add dhall.scm.
* gnu/packages/patches/dhall-remove-network-tests.patch: Add patch to remove
  network tests.
---
 gnu/local.mk                                  |   3 +-
 gnu/packages/dhall.scm                        | 132 ++++++++++++++++++
 .../patches/dhall-remove-network-tests.patch  |  97 +++++++++++++
 3 files changed, 231 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/dhall.scm
 create mode 100644 gnu/packages/patches/dhall-remove-network-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index aba58ae03a..d0b29a26bc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -21,7 +21,7 @@
 # Copyright © 2018 Stefan Stefanović <[email-masked]>
 # Copyright © 2018 Maxim Cournoyer <[email-masked]>
 # Copyright © 2019 Guillaume Le Vaillant <[email-masked]>
-# Copyright © 2019 John Soo <[email-masked]>
+# Copyright © 2019, 2020 John Soo <[email-masked]>
 # Copyright © 2019 Jonathan Brielmaier <[email-masked]>
 # Copyright © 2019 Evan Straw <[email-masked]>
 # Copyright © 2019 Brett Gilio <[email-masked]>
@@ -151,6 +151,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/debian.scm			\
   %D%/packages/debug.scm			\
   %D%/packages/dejagnu.scm			\
+  %D%/packages/dhall.scm			\
   %D%/packages/dico.scm				\
   %D%/packages/dictionaries.scm			\
   %D%/packages/diffoscope.scm			\
diff --git a/gnu/packages/dhall.scm b/gnu/packages/dhall.scm
new file mode 100644
index 0000000000..0c57aae46c
--- /dev/null
+++ b/gnu/packages/dhall.scm
@@ -0,0 +1,132 @@
+;;; Copyright © 2020 John Soo <[email-masked]>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dhall)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-crypto)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (guix download)
+  #:use-module (guix build-system haskell)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages))
+
+(define-public dhall
+  (package
+    (name "dhall")
+    (version "1.31.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/dhall/dhall-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "18v7vvcbcm9s7slh6h43rj9yakkkxwnwgj6kv84i6qzd2j7d80mc"))
+       (patches (search-patches "dhall-remove-network-tests.patch"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-aeson-pretty" ,ghc-aeson-pretty)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-atomic-write" ,ghc-atomic-write-0.2.0.7)
+       ("ghc-case-insensitive" ,ghc-case-insensitive)
+       ("ghc-cborg" ,ghc-cborg)
+       ("ghc-cborg-json" ,ghc-cborg-json)
+       ("ghc-contravariant" ,ghc-contravariant)
+       ("ghc-data-fix" ,ghc-data-fix)
+       ("ghc-diff" ,ghc-diff)
+       ("ghc-dotgen" ,ghc-dotgen)
+       ("ghc-either" ,ghc-either)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-lens-family-core" ,ghc-lens-family-core)
+       ("ghc-megaparsec" ,ghc-megaparsec)
+       ("ghc-memory" ,ghc-memory)
+       ("ghc-network-uri" ,ghc-network-uri)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-parsers" ,ghc-parsers)
+       ("ghc-parser-combinators" ,ghc-parser-combinators)
+       ("ghc-prettyprinter" ,ghc-prettyprinter-1.6)
+       ("ghc-prettyprinter-ansi-terminal" ,ghc-prettyprinter-ansi-terminal)
+       ("ghc-pretty-simple" ,ghc-pretty-simple)
+       ("ghc-profunctors" ,ghc-profunctors)
+       ("ghc-repline" ,ghc-repline-0.3)
+       ("ghc-serialise" ,ghc-serialise)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-text-manipulate" ,ghc-text-manipulate)
+       ("ghc-th-lift-instances" ,ghc-th-lift-instances)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-uri-encode" ,ghc-uri-encode)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-cryptonite" ,ghc-cryptonite)
+       ("ghc-http-types" ,ghc-http-types)
+       ("ghc-http-client" ,ghc-http-client)
+       ("ghc-http-client-tls" ,ghc-http-client-tls)))
+    (native-inputs
+     `(("ghc-foldl" ,ghc-foldl)
+       ("ghc-generic-random" ,ghc-generic-random-1.3.0.1)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-special-values" ,ghc-special-values)
+       ("ghc-spoon" ,ghc-spoon)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-expected-failure" ,ghc-tasty-expected-failure)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-turtle" ,ghc-turtle)
+       ("ghc-mockery" ,ghc-mockery)
+       ("ghc-doctest" ,ghc-doctest)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-more-tests
+           (lambda _
+             (substitute* "src/Dhall/Tutorial.hs"
+               (((string-append
+                  "-- >>> input auto "
+                  "\"https://raw.githubusercontent.com/dhall-lang"
+                  "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
+                  "examples/True\" :: IO Bool"))
+                "")
+               (((string-append
+                  "-- >>> input auto "
+                  "\"False == "
+                  "https://raw.githubusercontent.com/dhall-lang"
+                  "/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/"
+                  "examples/True\" :: IO Bool"))
+                ""))
+             #t)))))
+    (home-page
+     "https://dhall-lang.org/")
+    (synopsis
+     "Configuration language guaranteed to terminate")
+    (description
+     "Dhall is an explicitly typed configuration language that is not Turing
+complete.  Despite being Turing incomplete, Dhall is a real programming
+language with a type-checker and evaluator.
+
+Use this library to parse, type-check, evaluate, and pretty-print the Dhall
+configuration language.  This package also includes an executable which
+type-checks a Dhall file and reduces the file to a fully evaluated normal
+form.")
+    (license license:bsd-3)))
diff --git a/gnu/packages/patches/dhall-remove-network-tests.patch b/gnu/packages/patches/dhall-remove-network-tests.patch
new file mode 100644
index 0000000000..c260e7844d
--- /dev/null
+++ b/gnu/packages/patches/dhall-remove-network-tests.patch
@@ -0,0 +1,97 @@
+diff a/dhall-lang/tests/import/failure/referentiallyInsane.dhall b/dhall-lang/tests/import/failure/referentiallyInsane.dhall
+--- a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
++++ /dev/null
+@@ -1,13 +0,0 @@
+-{- The following remote import attempts to import an environment variable, which
+-   must be disallowed by the referential sanity check
+-
+-   One reason for doing this is to protect against remote imports exfiltrating
+-   environment variables (such as via custom headers).  Only referentially
+-   opaque imports (i.e. local imports) have permission to refer to other
+-   referentially opaque imports in order to protect against this attack.
+-
+-   The referential sanity check also ensures that remote imports are
+-   referentially transparent.  Or in other words, any import that is globally
+-   addressable must have a meaning that is not context-sensitive.
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
+diff a/dhall-lang/tests/import/success/customHeadersA.dhall b/dhall-lang/tests/import/success/customHeadersA.dhall
+--- a/dhall-lang/tests/import/success/customHeadersA.dhall
++++ /dev/null
+@@ -1,3 +0,0 @@
+-https://httpbin.org/user-agent
+-  using [ { mapKey = "User-Agent", mapValue = "Dhall" } ]
+-  as Text
+diff a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall b/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
+--- a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- The purpose of this test is to verify that the custom headers supplied to
+-   this import are not forwarded to the transitive import of
+-   https://httpbin.org/user-agent
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall
+-  using [ { mapKey = "User-Agent", mapValue = "Secret" } ]
+diff a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall b/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
+--- a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt as Text
+diff a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall b/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
+--- a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+-    This test verifies that `env:VAR as Location` isn't rejected as referentially opaque,
+-    as `env:VAR` on its own would.
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/EnvA.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- This test verifies that `missing as Location` succeeds when chained since:
+-   * The `missing` is never actually resolved (due to the `as Location`)
+-   * The `missing` should be treated as referentially transparent (and therefore
+-     be a valid transitive dependency of a remote import)
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/MissingA.dhall
+diff a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{-
+-    This URL returns (probably) a different result for each request. This test
+-    ensures that import results for a given URL are correctly cached within an
+-    execution of dhall.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0
+diff a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+-    This URL returns (probably) a different result for each request. This test
+-    ensures that import locations are canonicalized before being cached.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0
-- 
2.26.0