unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Leung <bkleung89@gmail.com>
To: 36326@debbugs.gnu.org
Subject: [bug#36326] [PATCH] Add Haskell packages.
Date: Wed, 26 Jun 2019 18:09:05 +0200	[thread overview]
Message-ID: <CAAc=MEzby+Ne_Kcek6sWDk5fbiZgx=YOpsxoNa4Y1hP63sT1Lg@mail.gmail.com> (raw)
In-Reply-To: <CAAc=MEz4ETtmYJcfTJ7rtbERRm3yzFqx85tKCjaKpfANgN=c8w@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

Sorry, I didn't see the entirety of the lint result when I last wrote. I've
fixed everything up. The linter should choke on ghc-hindent, which is fine
since it's an upstream problem with the latest release (the .cabal file has
improper indentation).

On Sun, Jun 23, 2019 at 12:49 AM Brian Leung <bkleung89@gmail.com> wrote:

> Hi,
>
> OK, I've linted and added another package. Please ignore my last email.
>

[-- Attachment #1.2: Type: text/html, Size: 759 bytes --]

[-- Attachment #2: 0001-gnu-Add-ghc-validity.patch --]
[-- Type: text/x-patch, Size: 1716 bytes --]

From 36df2ae088e093324e374849bb9c26b72a222acc Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 20 Jun 2019 07:55:34 +0200
Subject: [PATCH 1/8] gnu: Add ghc-validity.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index cfbd3bfb76..f4d7e5bc4e 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11537,6 +11537,32 @@ stand for certain ASCII character sequences, i.e. → instead of @code{->},
 ∀ instead of @code{forall} and many others.")
     (license license:bsd-3)))
 
+(define-public ghc-validity
+  (package
+    (name "ghc-validity")
+    (version "0.9.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/validity/validity-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "112wchq5l39fi9bkfkljic7bh1rd5gvz4lwjjw9pajg0zj51pyib"))))
+    (build-system haskell-build-system)
+    (native-inputs `(("ghc-hspec" ,ghc-hspec)
+                     ("hspec-discover" ,hspec-discover)))
+    (home-page
+     "https://github.com/NorfairKing/validity")
+    (synopsis "Validity typeclass")
+    (description
+     "Values of custom types usually have invariants imposed upon them.  This
+package provides the @code{Validity} type class, which makes these invariants
+explicit by providing a function to check whether the invariants hold.")
+    (license license:expat)))
+
 (define-public ghc-stylish-haskell
   (package
     (name "ghc-stylish-haskell")
-- 
2.22.0


[-- Attachment #3: 0003-gnu-Add-ghc-genvalidity-property.patch --]
[-- Type: text/x-patch, Size: 1889 bytes --]

From bf40e2ea0df96f5e27003a6efea8ca3e2077a9d3 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 20 Jun 2019 07:56:21 +0200
Subject: [PATCH 3/8] gnu: Add ghc-genvalidity-property.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 4d46f94fc3..1a980155ea 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11568,6 +11568,38 @@ stand for certain ASCII character sequences, i.e. → instead of @code{->},
 with the @code{Validity} typeclass.")
     (license license:expat)))
 
+(define-public ghc-genvalidity-property
+  (package
+    (name "ghc-genvalidity-property")
+    (version "0.4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/"
+             "genvalidity-property/genvalidity-property-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0zayycx62226w54rvkxwhvqhznsr33dk3ds55yyqrfqbnhvph1s9"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-genvalidity" ,ghc-genvalidity)
+       ("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)
+       ("ghc-validity" ,ghc-validity)))
+    (native-inputs `(("ghc-doctest" ,ghc-doctest)))
+    (home-page
+     "https://github.com/NorfairKing/validity")
+    (synopsis
+     "Standard properties for functions on @code{Validity} types")
+    (description
+     "This package supplements the @code{Validity} typeclass with standard
+properties for functions operating on them.")
+    (license license:expat)))
+
 (define-public ghc-validity
   (package
     (name "ghc-validity")
-- 
2.22.0


[-- Attachment #4: 0002-gnu-Add-ghc-genvalidity.patch --]
[-- Type: text/x-patch, Size: 1779 bytes --]

From 47ea16668da27b75dc20832a696a21ef128fa5b3 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 20 Jun 2019 07:56:04 +0200
Subject: [PATCH 2/8] gnu: Add ghc-genvalidity.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index f4d7e5bc4e..4d46f94fc3 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11537,6 +11537,37 @@ stand for certain ASCII character sequences, i.e. → instead of @code{->},
 ∀ instead of @code{forall} and many others.")
     (license license:bsd-3)))
 
+(define-public ghc-genvalidity
+  (package
+    (name "ghc-genvalidity")
+    (version "0.8.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/genvalidity/genvalidity-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0w38aq9hfyymidncgkrs6yvja7j573d9sap5qfg5rz910fhsij9a"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-validity" ,ghc-validity)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)
+       ("ghc-hspec-core" ,ghc-hspec-core)))
+    (home-page
+     "https://github.com/NorfairKing/validity")
+    (synopsis
+     "Testing utilities for the @code{validity} library")
+    (description
+     "This package provides testing utilities that are useful in conjunction
+with the @code{Validity} typeclass.")
+    (license license:expat)))
+
 (define-public ghc-validity
   (package
     (name "ghc-validity")
-- 
2.22.0


[-- Attachment #5: 0004-gnu-Add-ghc-path.patch --]
[-- Type: text/x-patch, Size: 2120 bytes --]

From 5760ce9f44069317584dc832a26ac41c10caf952 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 20 Jun 2019 07:56:47 +0200
Subject: [PATCH 4/8] gnu: Add ghc-path.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 1a980155ea..0f4f941d0f 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11626,6 +11626,45 @@ package provides the @code{Validity} type class, which makes these invariants
 explicit by providing a function to check whether the invariants hold.")
     (license license:expat)))
 
+(define-public ghc-path
+  (package
+    (name "ghc-path")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/path/path-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0nayla4k1gb821k8y5b9miflv1bi8f0czf9rqr044nrr2dddi2sb"))))
+    (build-system haskell-build-system)
+    (arguments
+     ;; TODO: There are some Windows-related tests and modules that need to be
+     ;; danced around.
+     `(#:tests? #f
+       #:cabal-revision
+       ("1" "05b1zwx2a893h4h5wvgpc5g5pyx71hfmx409rqisd8s1bq1hn463")))
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-hashable" ,ghc-hashable)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-genvalidity" ,ghc-genvalidity)
+       ("ghc-genvalidity-property" ,ghc-genvalidity-property)
+       ("ghc-hspec" ,ghc-hspec)
+       ("ghc-validity" ,ghc-validity)))
+    (home-page
+     "http://hackage.haskell.org/package/path")
+    (synopsis "Support for well-typed paths")
+    (description "This package introduces a type for paths upholding useful
+invariants.")
+    (license license:bsd-3)))
+
 (define-public ghc-stylish-haskell
   (package
     (name "ghc-stylish-haskell")
-- 
2.22.0


[-- Attachment #6: 0005-gnu-Add-ghc-path-io.patch --]
[-- Type: text/x-patch, Size: 1921 bytes --]

From 5a3dbc073d77a0e2fe968cfe10feb08b22413b3b Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 20 Jun 2019 07:57:01 +0200
Subject: [PATCH 5/8] gnu: Add ghc-path-io.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 0f4f941d0f..b2951b40bd 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11665,6 +11665,39 @@ explicit by providing a function to check whether the invariants hold.")
 invariants.")
     (license license:bsd-3)))
 
+(define-public ghc-path-io
+  (package
+    (name "ghc-path-io")
+    (version "1.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/path-io/path-io-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0jqx3mi4an4kb3kg78n1p3xrz832yrfrnvj795b0xhkv6h1z5ir3"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-dlist" ,ghc-dlist)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-path" ,ghc-path)
+       ("ghc-transformers-base" ,ghc-transformers-base)
+       ("ghc-unix-compat" ,ghc-unix-compat)
+       ("ghc-temporary" ,ghc-temporary)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)))
+    (home-page
+     "https://github.com/mrkkrp/path-io")
+    (synopsis "Functions for manipulating well-typed paths")
+    (description "This package provides an interface to the @code{directory}
+package for users of @code{path}.  It also implements some missing stuff like
+recursive scanning and copying of directories, working with temporary
+files/directories, and more.")
+    (license license:bsd-3)))
+
 (define-public ghc-stylish-haskell
   (package
     (name "ghc-stylish-haskell")
-- 
2.22.0


[-- Attachment #7: 0006-gnu-Add-ghc-descriptive.patch --]
[-- Type: text/x-patch, Size: 1804 bytes --]

From 134e99814fab91f2944fa1b7d82dffab56d04cfd Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Fri, 21 Jun 2019 03:44:27 +0200
Subject: [PATCH 6/8] gnu: Add ghc-descriptive.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index b2951b40bd..c80a8f43ad 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11698,6 +11698,38 @@ recursive scanning and copying of directories, working with temporary
 files/directories, and more.")
     (license license:bsd-3)))
 
+(define-public ghc-descriptive
+  (package
+    (name "ghc-descriptive")
+    (version "0.9.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/descriptive/descriptive-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0y5693zm2kvqjilybbmrcv1g6n6x2p6zjgi0k0axjw1sdhh1g237"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-bifunctors" ,ghc-bifunctors)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-hunit" ,ghc-hunit)
+       ("ghc-hspec" ,ghc-hspec)))
+    (home-page
+     "https://github.com/chrisdone/descriptive")
+    (synopsis
+     "Self-describing consumers/parsers: forms, cmd-line args, JSON, etc.")
+    (description
+     "This package provides datatypes and functions for creating consumers
+and parsers with useful semantics.")
+    (license license:bsd-3)))
+
 (define-public ghc-stylish-haskell
   (package
     (name "ghc-stylish-haskell")
-- 
2.22.0


[-- Attachment #8: 0008-gnu-Add-ghc-hindent.patch --]
[-- Type: text/x-patch, Size: 3356 bytes --]

From fca61ec1f0812dafdd1a4c9402d592316822432e Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Sat, 22 Jun 2019 23:47:32 +0200
Subject: [PATCH 8/8] gnu: Add ghc-hindent.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c88b6e40f7..75d280d7ed 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -41,6 +41,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages emacs)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -11698,6 +11699,64 @@ recursive scanning and copying of directories, working with temporary
 files/directories, and more.")
     (license license:bsd-3)))
 
+(define-public ghc-hindent
+  (package
+    (name "ghc-hindent")
+    (version "5.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/hindent/hindent-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0wkfik7mvqskk23kyh7ybgnlh3j9j1ym7d3ncahsbli9w654b7xg"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:modules ((guix build haskell-build-system)
+                  (guix build utils)
+                  (guix build emacs-utils))
+       #:imported-modules (,@%haskell-build-system-modules
+                           (guix build emacs-utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'emacs-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (elisp-file "elisp/hindent.el")
+                    (dest  (string-append
+                            out "/share/emacs/site-lisp/guix.d/hindent-" ,version))
+                    (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
+               (make-file-writable elisp-file)
+               (emacs-substitute-variables elisp-file
+                 ("hindent-process-path"
+                  (string-append out "/bin/hindent")))
+               (install-file elisp-file dest)
+               (emacs-generate-autoloads "hindent" dest)))))))
+    (inputs
+     `(("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
+       ("ghc-monad-loops" ,ghc-monad-loops)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-yaml" ,ghc-yaml)
+       ("ghc-unix-compat" ,ghc-unix-compat)
+       ("ghc-path" ,ghc-path)
+       ("ghc-path-io" ,ghc-path-io)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-diff" ,ghc-diff)
+       ("emacs" ,emacs-minimal)))
+    (home-page
+     "https://github.com/commercialhaskell/hindent")
+    (synopsis "Extensible Haskell pretty printer")
+    (description
+     "This package provides automatic formatting for Haskell files.  Both a
+library and an executable.")
+    (license license:bsd-3)))
+
 (define-public ghc-descriptive
   (package
     (name "ghc-descriptive")
-- 
2.22.0


[-- Attachment #9: 0007-gnu-Add-ghc-exactprint.patch --]
[-- Type: text/x-patch, Size: 1816 bytes --]

From fbb2c48352235b8eb4ab1cb18349748f5a407ff5 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Fri, 21 Jun 2019 03:44:39 +0200
Subject: [PATCH 7/8] gnu: Add ghc-exactprint.

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

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c80a8f43ad..c88b6e40f7 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11730,6 +11730,39 @@ files/directories, and more.")
 and parsers with useful semantics.")
     (license license:bsd-3)))
 
+(define-public ghc-exactprint
+  (package
+    (name "ghc-exactprint")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/ghc-exactprint/ghc-exactprint-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "12nqpqmi9c57a3hgpfy8q073zryz66ylmcvf29hyffpj7vmmnvhl"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-paths" ,ghc-paths)
+       ("ghc-syb" ,ghc-syb)
+       ("ghc-free" ,ghc-free)))
+    (native-inputs
+     `(("ghc-hunit" ,ghc-hunit)
+       ("ghc-diff" ,ghc-diff)
+       ("ghc-silently" ,ghc-silently)
+       ("ghc-filemanip" ,ghc-filemanip)))
+    (home-page
+     "http://hackage.haskell.org/package/ghc-exactprint")
+    (synopsis "ExactPrint for GHC")
+    (description
+     "Using the API Annotations available from GHC 7.10.2, this library
+provides a means to round-trip any code that can be compiled by GHC, currently
+excluding @file{.lhs} files.")
+    (license license:bsd-3)))
+
 (define-public ghc-stylish-haskell
   (package
     (name "ghc-stylish-haskell")
-- 
2.22.0


  reply	other threads:[~2019-06-26 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 18:51 [bug#36326] [PATCH] Add Haskell packages Brian Leung
2019-06-22 22:49 ` Brian Leung
2019-06-26 16:09   ` Brian Leung [this message]
2019-07-12  0:37     ` Brian Leung
2019-07-17 14:21       ` Timothy Sample
     [not found]         ` <CAAc=MEyy1Ljbmk8Z43UXNH8NsOMVoBRYHqPjUFNjoRhzAaC_DA@mail.gmail.com>
     [not found]           ` <87o91s5fct.fsf@ngyro.com>
     [not found]             ` <CAAc=MEzmSpKLetz6+xga4wdtQ7n6vOxfE9m1VvdO1Na9vZp1+Q@mail.gmail.com>
2019-07-20  3:16               ` bug#36326: " Timothy Sample

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAc=MEzby+Ne_Kcek6sWDk5fbiZgx=YOpsxoNa4Y1hP63sT1Lg@mail.gmail.com' \
    --to=bkleung89@gmail.com \
    --cc=36326@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).