diff mbox series

[bug#37052] (wip-haskell-updates) Add stylish-haskell.

Message ID CAKf5CqUKkNraDJ+TSENu5krn9gMwqQt3a3cKPpBF2_PkMaZ=ng@mail.gmail.com
State Accepted
Headers show
Series [bug#37052] (wip-haskell-updates) Add stylish-haskell. | expand

Commit Message

John Soo Aug. 16, 2019, 2:25 p.m. UTC
Hi everyone,

Stylish haskell is a formatting tool for haskell code. It is the default
formatting option for the emacs haskell-mode.  It is not the newest or the
best but it is good enough for me usually.

Thanks,

- John

Comments

Ludovic Courtès Aug. 28, 2019, 4:08 p.m. UTC | #1
Hi John,

John Soo <jsoo1@asu.edu> skribis:

> From 512eed6f9d3cc788c381378557d576e470600ca0 Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Fri, 16 Aug 2019 07:18:30 -0700
> Subject: [PATCH 1/2] gnu: Add ghc-file-embed.
>
> * gnu/packages/haskell-xyz (ghc-file-embed): new file.

Please address the ‘guix lint’ warning.

> +  (package
> +    (name "ghc-file-embed")
> +    (version "0.0.11")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append
> +         "https://hackage.haskell.org/package/file-embed/"
> +         "file-embed-" version ".tar.gz"))

I think Robert (Cc’d) aims make sure all the GHC packages come from the
same Stackage “snapshot”.  Robert, could you tell whether this is the
case?

Also, please use mirror://hackage here.

> +    (home-page
> +     "https://github.com/snoyberg/file-embed")
> +    (synopsis
> +     "Use Template Haskell to embed file contents directly.")

Better to keep each on a single line.  :-)

> +    (description
> +     "Use Template Haskell to read a file or all the files in a directory,
> +and turn them into (path, bytestring) pairs embedded in your Haskell code.")

Please see
<https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html>.

> From fe5cbaeb2364d5d5debd629090d4a1fdd6f5939a Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Fri, 16 Aug 2019 07:20:28 -0700
> Subject: [PATCH 2/2] gnu: Add stylish-haskell.
>
> * gnu/packages/haskell-apps (stylish-haskell): new variable.

Same comments.  :-)

Thanks,
Ludo’.
Timothy Sample Aug. 29, 2019, 12:50 a.m. UTC | #2
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> John Soo <jsoo1@asu.edu> skribis:
>
>> +  (package
>> +    (name "ghc-file-embed")
>> +    (version "0.0.11")
>
> I think Robert (Cc’d) aims make sure all the GHC packages come from the
> same Stackage “snapshot”.  Robert, could you tell whether this is the
> case?

It’s too new.  Right now we are following LTS 12, which has file-embed
at 0.0.10.1.  The list is at <https://www.stackage.org/lts-12>.


-- Tim
Robert Vollmert Aug. 29, 2019, 11:15 a.m. UTC | #3
On 28. Aug 2019, at 18:08, Ludovic Courtès <ludo@gnu.org> wrote:
> I think Robert (Cc’d) aims make sure all the GHC packages come from the
> same Stackage “snapshot”.  Robert, could you tell whether this is the
> case?

Sorry, I’m afraid I don’t really have plans here anymore / won’t be able
to take care of the Haskell packages.

Cheers
Robert
Ludovic Courtès Aug. 29, 2019, 12:37 p.m. UTC | #4
Hi Robert,

Robert Vollmert <rob@vllmrt.net> skribis:

> On 28. Aug 2019, at 18:08, Ludovic Courtès <ludo@gnu.org> wrote:
>> I think Robert (Cc’d) aims make sure all the GHC packages come from the
>> same Stackage “snapshot”.  Robert, could you tell whether this is the
>> case?
>
> Sorry, I’m afraid I don’t really have plans here anymore / won’t be able
> to take care of the Haskell packages.

I’m sad to hear that, but thanks for letting us know.

I realize we committers have been lagging behind, and I’m afraid this
may have to do with your decision.  :-/  If you have any suggestions on
how to improve our process, please let us know.  It’s tough!

Ludo’.
diff mbox series

Patch

From fe5cbaeb2364d5d5debd629090d4a1fdd6f5939a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Fri, 16 Aug 2019 07:20:28 -0700
Subject: [PATCH 2/2] gnu: Add stylish-haskell.

* gnu/packages/haskell-apps (stylish-haskell): new variable.
---
 gnu/packages/haskell-apps.scm | 39 +++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index edefd99e23..19a74a08e2 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -569,3 +569,42 @@  that cause a shell to behave strangely and counter-intuitively.
 advanced user's otherwise working script to fail under future circumstances.
 @end enumerate")
     (license license:gpl3+)))
+
+(define-public stylish-haskell
+  (package
+    (name "stylish-haskell")
+    (version "0.9.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://hackage.haskell.org/package/stylish-haskell/"
+         "stylish-haskell-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1zs624xqp6j8vrl6pfv18dm8vz8hvz25grri65ximxhcizgwhnax"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-file-embed" ,ghc-file-embed)
+       ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-syb" ,ghc-syb)
+       ("ghc-yaml" ,ghc-yaml)
+       ("ghc-strict" ,ghc-strict)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-hunit" ,ghc-hunit)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
+    (home-page
+     "https://github.com/jaspervdj/stylish-haskell")
+    (synopsis "Haskell code prettifier")
+    (description
+     "A simple Haskell code prettifier.  The goal is not to format all
+of the code in a file, since I find those kind of tools often
+\"get in the way\".  However, manually cleaning up import statements
+etc.  gets tedious very quickly.
+
+This tool tries to help where necessary without getting in the way.")
+    (license license:bsd-3)))
-- 
2.22.0