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 cNcnCVMSk1/mSgAA0tVLHw (envelope-from ) for ; Fri, 23 Oct 2020 17:26:43 +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 0JQJBVMSk1/FBgAAbx9fmQ (envelope-from ) for ; Fri, 23 Oct 2020 17:26:43 +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 DA9D69403EE for ; Fri, 23 Oct 2020 17:26:42 +0000 (UTC) Received: from localhost ([::1]:60838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW0pt-0004SB-Sh for larch@yhetil.org; Fri, 23 Oct 2020 13:26:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kW0pJ-0003Uh-DO for guix-patches@gnu.org; Fri, 23 Oct 2020 13:26:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kW0pJ-0000Pw-3w for guix-patches@gnu.org; Fri, 23 Oct 2020 13:26:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kW0pI-0000F5-W1 for guix-patches@gnu.org; Fri, 23 Oct 2020 13:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44174] [PATCH 08/16] gnu: Add ghc-text-short. Resent-From: Carlo Holl Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Oct 2020 17:26:04 +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.1603473947798 (code B ref 44174); Fri, 23 Oct 2020 17:26:04 +0000 Received: (at 44174) by debbugs.gnu.org; 23 Oct 2020 17:25:47 +0000 Received: from localhost ([127.0.0.1]:58277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0p0-0000Ci-Vd for submit@debbugs.gnu.org; Fri, 23 Oct 2020 13:25:47 -0400 Received: from mail-pg1-f180.google.com ([209.85.215.180]:45314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0W6-00085Q-6x for 44174@debbugs.gnu.org; Fri, 23 Oct 2020 13:06:14 -0400 Received: by mail-pg1-f180.google.com with SMTP id 19so1708237pge.12 for <44174@debbugs.gnu.org>; Fri, 23 Oct 2020 10:06:14 -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=1BMcl3mtGsogR683zqpjNxqTAJC66CShJ7r6NUh+yIc=; b=ravwqeG7CAek8PIs1YbdYyyA8FOS8DmNP1YISwc0Q0VgGXdLaftGHq+Cdh+zfnD9xb JuvToS67NeiEU4QsNCz6WaTyGWlzsEHMR5S9PnO/e5KzWTAco5LzYv2dNrDQ4Aut2/0L 6BL/LE5+FwgqIotCmQhXRS10dvv/VOZUatL865tf/0rQujcfGJfFMX52hxSl6HQnFgif ASkDfx5kUZrUPtv9YTrYbY0afmerGKOBcivgEZidmmLXwcktKbjKW17E/TSU8LSVQ7zO x4YFtAEDa87NHIk8U4S4fIuo6M8FWNdGG1CuH+Dbi2RxP2lDwI1sz+ZhRizqCdU2HrE+ exWA== 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=1BMcl3mtGsogR683zqpjNxqTAJC66CShJ7r6NUh+yIc=; b=B/OilDLBeKxXbOWIOFpkLDje5pRUquAZm2iJEqzUJgmgWsanJYg4OhYTzu/aytvahp AJUOPefzFExu86sKQFs1HZLnqcqxAHxalTkCAL3RV/kjU4YmMcuC1bbm8SE4Fycz6JcA gtksnytogU498SoX7ZjExNoM4Ex6O2rI1Bv4aYBG4yanXFRiXj9/eURBhtlsU0bi0SLf No4oNMLEpmvSm7bhcWzZrVSYWBUSSeVyL6T6ofO5rqwxMRAxst32GZQi+wYC9MuM+MsR +VET3V7ccmBNeshVN23UsEsn8vb8aWyGPO7iFE2eoFUVBANYMkB3QwqODuywvJB+fVm0 ++gw== X-Gm-Message-State: AOAM532oHu4z/AvSp8jE1p0ZyRjL052Qoa8bmU1AvU5/HiFd+3YgAB5G oRKrZS4j+PjXzEZjJfOFNcyJyKP1TVA= X-Google-Smtp-Source: ABdhPJwgyjX5ah3TVfJuJaYx48o66REUKO/nZzg5GLoo7TN8UW5mbIdxchFB34jnNVJoR12IB9gELQ== X-Received: by 2002:a17:90a:7023:: with SMTP id f32mr3808864pjk.87.1603472768402; Fri, 23 Oct 2020 10:06:08 -0700 (PDT) Received: from cehdev.hsd1.ca.comcast.net ([2603:3024:1704:300::7ae9]) by smtp.gmail.com with ESMTPSA id q10sm2976825pjd.6.2020.10.23.10.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 10:06:07 -0700 (PDT) From: Carlo Holl Date: Fri, 23 Oct 2020 10:05:36 -0700 Message-Id: <20201023170544.9860-8-carloholl@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023170544.9860-1-carloholl@gmail.com> References: <20201023170544.9860-1-carloholl@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Fri, 23 Oct 2020 13:25:42 -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: scn0 X-Spam-Score: 6.59 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=ravwqeG7; 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: Yes X-TUID: kPVH4f3syiIx --- 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 e831c12160..c4a8d4c208 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -8924,6 +8924,47 @@ require aeson (description "Safe conversions between textual types") (license license:isc))) +(define-public ghc-text-short + (package + (name "ghc-text-short") + (version "0.1.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/text-short/text-short-" + version + ".tar.gz")) + (sha256 + (base32 + "0xyrxlb602z8bc9sr2y1fag0x56a20yj5qrkvy7iwc6hnznrynxz")))) + (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" + "17cb7p0qywf2dsrq3g8qb3ssknd9wl5k0nc2pxz9gc3l8rxpkw51"))) + (home-page + "https://hackage.haskell.org/package/text-short") + (synopsis + "Memory-efficient representation of Unicode text strings") + (description "This package provides the @code{ShortText} type which +is suitable for keeping many short strings in memory. This is similiar +to how @code{ShortByteString} relates to @code{ByteString}. + +The main difference between @code{Text} and @code{ShortText} is that +@code{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))) + (define-public ghc-doclayout (package (name "ghc-doclayout") -- 2.28.0