From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0O5BDmL8uGDrMwEAgWs5BA (envelope-from ) for ; Thu, 03 Jun 2021 17:59:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ULixCWL8uGD9fgAAB5/wlQ (envelope-from ) for ; Thu, 03 Jun 2021 15:59:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D3E632A58C for ; Thu, 3 Jun 2021 17:59:29 +0200 (CEST) Received: from localhost ([::1]:50596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lopkm-0000Ce-Po for larch@yhetil.org; Thu, 03 Jun 2021 11:59:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lopkP-0007N9-0Y for guix-patches@gnu.org; Thu, 03 Jun 2021 11:59:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lopkO-0006h0-P7 for guix-patches@gnu.org; Thu, 03 Jun 2021 11:59:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lopkO-0001xW-OO for guix-patches@gnu.org; Thu, 03 Jun 2021 11:59:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48813] [PATCH 8/8] gnu: Add ghc-brittany. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Jun 2021 15:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48813 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48813@debbugs.gnu.org Received: via spool by 48813-submit@debbugs.gnu.org id=B48813.16227359117441 (code B ref 48813); Thu, 03 Jun 2021 15:59:04 +0000 Received: (at 48813) by debbugs.gnu.org; 3 Jun 2021 15:58:31 +0000 Received: from localhost ([127.0.0.1]:44582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lopjr-0001vs-1w for submit@debbugs.gnu.org; Thu, 03 Jun 2021 11:58:31 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:53402 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lopje-0001ui-Iy for 48813@debbugs.gnu.org; Thu, 03 Jun 2021 11:58:19 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622735893; bh=1dBq9ktei3ob7q8kjCz79qfcbnrLJM2Df9lD7JfmEvY=; h=From:To:Subject:In-Reply-To:References:Date; b=GSAv9oBDWZ6t38NtusOUpXxUnuTki5Rvaw0j1YYeePmm45apZganKFHJORh1kjjIP p2UmJ0udfcs9QLsBO9isginJAbUkoK5CbLkI1GsFoJ1cLC7hA4R1brLDZuCzV+cDEO 4DbW9Z3CM8A4Vl2j+6rRRsiqu+a9ebDx7RkcTKL0= In-Reply-To: References: Message-Id: <49eb8fd90d7b7d285b0d9f6b2d7e99c8a6628570.1622735640.git.public@yoctocell.xyz> Date: Thu, 03 Jun 2021 17:58:12 +0200 MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622735969; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=uUPhlCX1TMwJ7NsqgDa2C8wN3/FsdByu3oVTJs0iwZk=; b=RwBkvefymkguhojlWeNKf9WYP+FjC17AixNopCeVb7IcUkr/jQOfppR2qBDAVRDvEN+W+T P1evX8mP4XYXnWpdcbTon42cMLe87iwaMne1eXhVwLsFpmt9PDIdTJw/ipoHth6iufVp8+ DfaGIvtmOy4wjFaG1M+CSZjydlBWxMGkX4m1W1e7NcgGmyYqulmXlHoAmaT2ACWXgh03R9 530XZjHDQpX3rTl1oL/ZsFHoHCXCvNqvQaPhwdd5snlsamqg8S8vOnpBeMoq7gFlmvYXyd KECirElOtC6R2XFxWxhTSKM7DTGC+jqT6zFkQX7bOTtNa0c6MUcJooXEtJeFXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622735969; a=rsa-sha256; cv=none; b=eeUBRLOlCdjYzG7yfppk3Gfjn9Rhx634S17uj+3LyH7Fg/l4miUNo/+nOWsBtwvv37L6+w PbRpREpEoFkfhD/qQAs2K1eOTIvzJlDjuJJzcWWqloD5RLCaAINQXnFsUsvcTVRuLxqPwa I2LYfEhHzgsEyfDHsGU4+IeNdZj0cN4DtVep+9pAb6Dc8yHTPlSZ9NEqyMIt/3luZ/pkqu eycNzEtUjZIoTpDhezqwlfODhGZzSlYmVLkLHSfTHP4LuUrTa9N1UM7Gn0qxAQVrLWn5yL ETshwbO10VZciozX/YkJUOmQgCQ5v+QJ3RVLVGqhnYOmeNdu3VfX0RymSrxFFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=GSAv9oBD; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=GSAv9oBD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: D3E632A58C X-Spam-Score: 1.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: voHNhaUKT3JC * 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