unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#37052] [PATCH] (wip-haskell-updates) Add stylish-haskell.
@ 2019-08-16 14:25 John Soo
  2019-08-28 16:08 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: John Soo @ 2019-08-16 14:25 UTC (permalink / raw)
  To: 37052


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

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

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

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

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.
---
 gnu/packages/haskell-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 90b85d8f43..2ddfec4bc4 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11729,3 +11729,28 @@ provides access to the full zlib feature set.")
     (description "This package provides low-level bindings to the
 @code{zlib} package.")
     (license license:bsd-3)))
+
+(define-public ghc-file-embed
+  (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"))
+       (sha256
+        (base32
+         "0l6dkwccbzzyx8rcav03lya2334dgi3vfwk96h7l93l0fc4x19gf"))))
+    (build-system haskell-build-system)
+    (home-page
+     "https://github.com/snoyberg/file-embed")
+    (synopsis
+     "Use Template Haskell to embed file contents directly.")
+    (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.")
+    (license license:bsd-3)))
+
-- 
2.22.0


[-- Attachment #3: 0002-gnu-Add-stylish-haskell.patch --]
[-- Type: text/x-patch, Size: 2183 bytes --]

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-01 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 14:25 [bug#37052] [PATCH] (wip-haskell-updates) Add stylish-haskell John Soo
2019-08-28 16:08 ` Ludovic Courtès
2019-08-29  0:50   ` Timothy Sample
2019-08-29 11:15   ` Robert Vollmert
2019-08-29 12:37     ` [bug#37052] Haskell package maintenance Ludovic Courtès
2019-08-29 14:50     ` [bug#37052] [PATCH] (wip-haskell-updates) Add stylish-haskell John Soo
2019-09-01 21:06       ` bug#37052: " Ludovic Courtès

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).