From: Xinglu Chen <public@yoctocell.xyz>
To: 48813@debbugs.gnu.org
Subject: [bug#48813] [PATCH 8/8] gnu: Add ghc-brittany.
Date: Thu, 03 Jun 2021 17:58:12 +0200 [thread overview]
Message-ID: <49eb8fd90d7b7d285b0d9f6b2d7e99c8a6628570.1622735640.git.public@yoctocell.xyz> (raw)
In-Reply-To: <cover.1622735640.git.public@yoctocell.xyz>
* gnu/packages/haskell-xyz.scm (ghc-brittany): New variable.
---
gnu/packages/haskell-xyz.scm | 126 +++++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 446e60477b..ee54a65332 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -1211,6 +1211,132 @@ interface.")
using a simple box model.")
(license license:bsd-3)))
+(define-public ghc-brittany
+ (package
+ (name "ghc-brittany")
+ (version "0.12.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/brittany/brittany-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0nw7ymdb7xam634w42l1xjgyvpla8grcg02aj19fscw2fn9gfh7z"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-paths" ,ghc-paths)
+ ("ghc-exactprint" ,ghc-exactprint)
+ ("ghc-multistate" ,ghc-multistate)
+ ("ghc-syb" ,ghc-syb)
+ ("ghc-neat-interpolation"
+ ,ghc-neat-interpolation)
+ ("ghc-data-tree-print" ,ghc-data-tree-print)
+ ("ghc-butcher" ,ghc-butcher)
+ ("ghc-yaml" ,ghc-yaml)
+ ("ghc-aeson" ,ghc-aeson)
+ ("ghc-extra" ,ghc-extra)
+ ("ghc-uniplate" ,ghc-uniplate)
+ ("ghc-strict" ,ghc-strict)
+ ("ghc-monad-memo" ,ghc-monad-memo)
+ ("ghc-unsafe" ,ghc-unsafe)
+ ("ghc-safe" ,ghc-safe)
+ ("ghc-semigroups" ,ghc-semigroups)
+ ("ghc-cmdargs" ,ghc-cmdargs)
+ ("ghc-czipwith" ,ghc-czipwith)
+ ("ghc-random" ,ghc-random)))
+ (native-inputs
+ `(("ghc-hspec" ,ghc-hspec)
+ ("ghc-hspec" ,ghc-hspec)
+ ("ghc-hspec" ,ghc-hspec)))
+ (arguments
+ `(#:cabal-revision
+ ("2"
+ "0pfrm5vvh7x94f8gy8ka6rmq6yk6xxxgba68rd91bk8lbjxsmkxl")))
+ (home-page "https://github.com/lspitzner/brittany/")
+ (synopsis "Haskell source code formatter")
+ (description "Brittany is a Haskell source code formatter. The goal of
+this project is to:
+
+@itemize
+@item
+Always retain the semantics of the source being transformed;
+@item
+Be idempotent;
+@item
+Support the full GHC-haskell syntax including syntactic extensions (but
+excluding -XCPP which is too hard);
+@item
+Retain newlines and comments unmodified;
+@item
+Be clever about using the available horizontal space while not overflowing the
+column maximum unless it cannot be avoided;
+@item
+Be clever about aligning things horizontally (this can be turned off
+completely however);
+@item
+Have linear complexity in the size of the input.
+@end itemize")
+ (license license:agpl3)))
+
+(define-public ghc-butcher
+ (package
+ (name "ghc-butcher")
+ (version "1.3.2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/butcher/butcher-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0lpicayq9k59m2ydz989xsypr653xwhp6mmhlp7nmjzk6jwpq5q5"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-free" ,ghc-free)
+ ("ghc-unsafe" ,ghc-unsafe)
+ ("ghc-microlens" ,ghc-microlens)
+ ("ghc-microlens-th" ,ghc-microlens-th)
+ ("ghc-multistate" ,ghc-multistate)
+ ("ghc-extra" ,ghc-extra)
+ ("ghc-void" ,ghc-void)
+ ("ghc-bifunctors" ,ghc-bifunctors)
+ ("ghc-deque" ,ghc-deque)))
+ (native-inputs `(("ghc-hspec" ,ghc-hspec)))
+ (arguments
+ `(#:cabal-revision
+ ("2"
+ "1751sllw8s81x3s1dhilbr5lqnv9cpdqiv17c8by466aa6304dxa")))
+ (home-page "https://github.com/lspitzner/butcher/")
+ (synopsis "Chops a command or program invocation into digestable pieces.")
+ (description "This package is similar to the optparse-applicative package,
+but less features, more flexibility and more evil.
+
+The main differences are:
+
+@itemize
+@item Provides a pure interface by default
+
+@item Exposes an evil monadic interface, which allows for much nicer binding
+of command part results to some variable name.
+
+In optparse-applicative you easily lose track of what field you are modifying
+after the 5th <*> (admittedly, i think -XRecordWildCards improves on that
+issue already.)
+
+Evil, because you are not allowed to use the monad's full power in this case,
+i.e. there is a constraint that is not statically enforced. See below.
+
+@item The monadic interface allows much clearer definitions of commandparses
+with (nested) subcommands. No pesky sum-types are necessary.
+@end itemize")
+
+ (license license:bsd-3)))
+
(define-public ghc-byteable
(package
(name "ghc-byteable")
--
2.31.1
prev parent reply other threads:[~2021-06-03 15:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 15:55 [bug#48813] [PATCH 0/8] Add ghc-brittany and dependencies Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 1/8] gnu: Add ghc-strict-list Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 2/8] gnu: Add ghc-neat-interpolation Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 3/8] gnu: Add ghc-multistate Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 4/8] gnu: Add ghc-monad-memo Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 5/8] gnu: Add ghc-deque Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 6/8] gnu: Add ghc-data-tree-print Xinglu Chen
2021-06-03 15:58 ` [bug#48813] [PATCH 7/8] gnu: Add ghc-czipwith Xinglu Chen
2021-06-03 15:58 ` Xinglu Chen [this message]
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=49eb8fd90d7b7d285b0d9f6b2d7e99c8a6628570.1622735640.git.public@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=48813@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).