From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42393) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaec6-0004Ch-9d for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaec4-0001DN-3W for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaec3-0001Co-VW for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iaec3-0006C7-Sw for guix-patches@gnu.org; Fri, 29 Nov 2019 06:39:03 -0500 Subject: [bug#38423] [PATCH 04/49] gnu: Add ghc-text-short. Resent-Message-ID: From: Robert Vollmert Date: Fri, 29 Nov 2019 12:37:06 +0100 Message-Id: <20191129113751.82405-4-rob@vllmrt.net> In-Reply-To: <20191129113751.82405-1-rob@vllmrt.net> References: <20191129113751.82405-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38423@debbugs.gnu.org Cc: Robert Vollmert * gnu/packages/haskell-xyz.scm (ghc-text-short): New package. --- gnu/packages/haskell-xyz.scm | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index 350af5b0c0..708159adc6 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -13240,3 +13240,44 @@ data types.") (synopsis "An efficient strict text builder") (description "") (license license:expat))) + +(define-public ghc-text-short + (package + (name "ghc-text-short") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/text-short/text-short-" + version + ".tar.gz")) + (sha256 + (base32 + "0rqiwgjkgyfy8596swl0s0x2jqk6ddh2h02qxa32az2cs5kviwmk")))) + (build-system haskell-build-system) + (inputs `(("ghc-hashable" ,ghc-hashable))) + (native-inputs + `(("ghc-tasty" ,ghc-tasty) + ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) + ("ghc-tasty-hunit" ,ghc-tasty-hunit) + ("ghc-quickcheck-instances" + ,ghc-quickcheck-instances))) + (arguments + `(#:cabal-revision + ("2" + "106p7c0399zxdlh9f9qkgy7g2gp3bxqdpy6m6lnfhzi0pm5y8mks"))) + (home-page + "http://hackage.haskell.org/package/text-short") + (synopsis + "Memory-efficient representation of Unicode text strings") + (description + "This package provides the 'ShortText' type which is +suitable for keeping many short strings in memory. +This is similiar to how 'ShortByteString' relates to 'ByteString'. +The main difference between 'Text' and 'ShortText' is that 'ShortText' +uses UTF-8 instead of UTF-16 internally and also doesn't support +zero-copy slicing (thereby saving 2 words). Consequently, the +memory footprint of a (boxed) 'ShortText' value is 4 words +(2 words when unboxed) plus the length of the UTF-8 encoded payload.") + (license license:bsd-3))) -- 2.21.0 (Apple Git-122.2)