From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0Dw/NkMlnl+GSgAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 03:02:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EN0DMkMlnl9+KwAAbx9fmQ (envelope-from ) for ; Sun, 01 Nov 2020 03:02:27 +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 4B5F59403A0 for ; Sun, 1 Nov 2020 03:02:27 +0000 (UTC) Received: from localhost ([::1]:57960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZ3dS-000232-8Z for larch@yhetil.org; Sat, 31 Oct 2020 23:02:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZ3cB-00017Y-Af for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZ3cA-00085s-RQ for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZ3cA-00015b-Pi for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44174] [PATCH v2 12/15] gnu: Add ghc-cassava. Resent-From: Carlo Holl Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Nov 2020 03:01:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44174 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44174@debbugs.gnu.org Cc: Carlo Holl Received: via spool by 44174-submit@debbugs.gnu.org id=B44174.16041996564066 (code B ref 44174); Sun, 01 Nov 2020 03:01:06 +0000 Received: (at 44174) by debbugs.gnu.org; 1 Nov 2020 03:00:56 +0000 Received: from localhost ([127.0.0.1]:35234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ3by-00013P-TE for submit@debbugs.gnu.org; Sat, 31 Oct 2020 23:00:56 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:50976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ2il-0007wD-QT for 44174@debbugs.gnu.org; Sat, 31 Oct 2020 22:03:53 -0400 Received: by mail-pj1-f44.google.com with SMTP id ie6so787112pjb.0 for <44174@debbugs.gnu.org>; Sat, 31 Oct 2020 19:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MDCHMl4L11+oTziIkWAqOwQ3is7pwtew1ZgdCz5WXW8=; b=lUR/OXiREOF2O2cjTOFvFma4tI3RuFBRvGfbuTnYSr4IUAk8AniNOjyJdgwjVP/VHb Q5GcR9vhZa1vvuB9/ZQtmVOYcg2SyAbBV8A5wD+4Jc4nkEc1r4ZkwDbfb5c/lyPxqTdp OpgYJ4ldYQXptEwtTLUoQVPV+HLctZINVqUiwczhex0pQ0IhsiZOw4JKABbS+0kEiHfq Rx17aVeStIrKdYS8ZkFIO6N41ufWJRC6upHOePsfveFLIlGDg+c5FUYgoS5P4zobXmd9 8/F5XA2TnaLedOMiKqyH4GR8KLMcPn9tsL53o4cCMILjun83iZpNbgfH60A/9fDK0Vqx 1piA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MDCHMl4L11+oTziIkWAqOwQ3is7pwtew1ZgdCz5WXW8=; b=YvagyWSEmU5GDfHfBAU0o9f7NDBpACGADhZlitv0O7v8UCG18v2GcFXakVsdnocJf+ iV/JbM9P3yyfzKJF32acl4sIg8dTecc1D/scfenoKms1torpuijoBnpPHgV7+j9ijgbm fcJvkloVz2o3XSjWSkudDTgGQdbCSi+q8fnih8uQQzH2KFsU1LaxWnk9xMwUivHdnZuq zktDnFma3HRxWIg6DIcbQxocQx6mNFArN/gDhH8ziVPFEJLrpTvf97PLg1AamGWQ5Lh9 YhAFhltOW9tjqEDrF1VvasVDFAha7TskLCX01rWlR+CdYKpI65I6t1tRLZC6P5cead3+ vxVw== X-Gm-Message-State: AOAM530B2X6VwNjko8AxLYe2+VnN/Gl1skusEuOmpwQgl6Hc/HQnvgsT AZpHfFrH83+VL00oaY81i33zkCddc6o= X-Google-Smtp-Source: ABdhPJykNp4SVvUwzD0nrjFguvSKdWXDI7TOMwklhDCEhgb8QCZPkT543ZzVqTTbj3gQDspG8Oji3A== X-Received: by 2002:a17:902:8a8a:b029:d5:aba7:5abb with SMTP id p10-20020a1709028a8ab02900d5aba75abbmr15545882plo.50.1604196225944; Sat, 31 Oct 2020 19:03:45 -0700 (PDT) Received: from cehdev.hsd1.ca.comcast.net ([2603:3024:1704:300::8401]) by smtp.gmail.com with ESMTPSA id n27sm3051213pfq.59.2020.10.31.19.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 19:03:45 -0700 (PDT) From: Carlo Holl Date: Sat, 31 Oct 2020 19:02:33 -0700 Message-Id: <20201101020236.1108-13-carloholl@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201101020236.1108-1-carloholl@gmail.com> References: <20201101020236.1108-1-carloholl@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sat, 31 Oct 2020 23:00:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=lUR/OXiR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Spam-Score: 5.09 X-TUID: jHpWhBIqNrln * gnu/packages/haskell-xyz.scm (ghc-cassava): New variable. --- gnu/packages/haskell-xyz.scm | 89 ++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index 210df9775c..6f5b6c3253 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -1552,6 +1552,95 @@ constructor which can be parameterised by a string-like type like: the resulting type will be insensitive to cases.") (license license:bsd-3))) +(define-public ghc-cassava + (package + (name "ghc-cassava") + (version "0.5.2.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/cassava/cassava-" + version + ".tar.gz")) + (sha256 + (base32 + "01h1zrdqb313cjd4rqm1107azzx4czqi018c2djf66a5i7ajl3dk")))) + (build-system haskell-build-system) + (inputs + `(("ghc-attoparsec" ,ghc-attoparsec) + ("ghc-hashable" ,ghc-hashable) + ("ghc-scientific" ,ghc-scientific) + ("ghc-unordered-containers" + ,ghc-unordered-containers) + ("ghc-vector" ,ghc-vector) + ("ghc-only" ,ghc-only) + ("ghc-text-short" ,ghc-text-short) + ("ghc-bytestring-builder" + ,ghc-bytestring-builder))) + (native-inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-quickcheck-instances" + ,ghc-quickcheck-instances) + ("ghc-test-framework" ,ghc-test-framework) + ("ghc-test-framework-hunit" + ,ghc-test-framework-hunit) + ("ghc-test-framework-quickcheck2" + ,ghc-test-framework-quickcheck2))) + (arguments + `(#:cabal-revision + ("1" + "1ph8rf91z4nf1ryrh9s4gd1kq98jlgk2manwddkpch8k0n9xvfk4") + #:configure-flags '("--flags=-bytestring--lt-0_10_4"))) + (home-page "https://github.com/haskell-hvr/cassava") + (synopsis "CSV parsing and encoding library") + (description "@code{cassava} is a library for parsing and encoding +@url{https://tools.ietf.org/html/rfc4180, RFC 4180} compliant @url{https:// +en.wikipedia.org/wiki/Comma-separated_values, comma-separated values (CSV)} +data, which is a textual line-oriented format commonly used for exchanging +tabular data. + +@code{cassava}'s API includes support for + +@itemize @bullet + +@item +Index-based record-conversion +@item +Name-based record-conversion +@item +Typeclass directed conversion of fields and records +@item +Built-in field-conversion instances for standard types +@item +Customizable record-conversion instance derivation via GHC generics +@item +Low-level @url{https://hackage.haskell.org/package/bytestring), bytestring} +builders (see @url{https://hackage.haskell.org/package/cassava-0.5.2.0/docs/ +Data-Csv-Builder.html, Data.Csv.Builder}) +@item +Incremental decoding and encoding API (see @url{https://hackage.haskell.org/ +package/cassava-0.5.2.0/docs/Data-Csv-Incremental.html, Data.Csv.Incremental}) +@item +Streaming API for constant-space decoding (see @url{https://hackage.haskell.org/ +package/cassava-0.5.2.0/docs/Data-Csv-Streaming.html, Data.Csv.Streaming}) +@end itemize + +Moreover, this library is designed to be easy to use; for instance, here's a +very simple example of encoding CSV data: + +@verbatim +>>> Data.Csv.encode [(\"John\",27),(\"Jane\",28)] +\"John,27\r\nJane,28\r\n\" +@end verbatim + +Please refer to the documentation in @url{https://hackage.haskell.org/package/ +cassava-0.5.2.0/docs/Data-Csv.html, Data.Csv} and the included @url{https:// +hackage.haskell.org/package/cassava-0.5.2.0/#readme, README} for more usage +examples.") + (license license:bsd-3))) + (define-public ghc-cborg (package (name "ghc-cborg") -- 2.28.0