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 SMlJIgMlnl+DSgAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 03:01:23 +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 CNAxHgMlnl+eJQAAbx9fmQ (envelope-from ) for ; Sun, 01 Nov 2020 03:01:23 +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 485D19403CC for ; Sun, 1 Nov 2020 03:01:23 +0000 (UTC) Received: from localhost ([::1]:56382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZ3cQ-0001Nu-6d for larch@yhetil.org; Sat, 31 Oct 2020 23:01:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZ3c9-00013F-Lv for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZ3c9-00084r-7o for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZ3c9-000157-5z for guix-patches@gnu.org; Sat, 31 Oct 2020 23:01:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44174] [PATCH v2 08/15] gnu: Add ghc-text-short. Resent-From: Carlo Holl Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Nov 2020 03:01:05 +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.16041996544036 (code B ref 44174); Sun, 01 Nov 2020 03:01:05 +0000 Received: (at 44174) by debbugs.gnu.org; 1 Nov 2020 03:00:54 +0000 Received: from localhost ([127.0.0.1]:35226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ3bx-00012w-Fo for submit@debbugs.gnu.org; Sat, 31 Oct 2020 23:00:53 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:35420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ2ih-0007vG-MW for 44174@debbugs.gnu.org; Sat, 31 Oct 2020 22:03:48 -0400 Received: by mail-pf1-f172.google.com with SMTP id b3so8192606pfo.2 for <44174@debbugs.gnu.org>; Sat, 31 Oct 2020 19:03:47 -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=fzEGBZG+zdVjSuCFCS/LYQzrP7ini8kXo2RE/T0h8Tk=; b=WNQPCpI3hsu6pv6sV+ZtmdfABxWMIiIrGSch6f7pEC2EB4vBHy5OXX3rauUuPQ+jgE oYF2TidsIbUbau9Y1wYZEncaPhPn8F3++R72JMkAirwVh0LWPcgl3Y9zDBMN0ZTIltyi WxeYxICrrwYPB+e+cQcFjvUeciA2JHFppFs/6+D0WStBTOFtHNX9x9dvjrMRvkKzSn9f VGY1irC58lDwFGk7o84XEi9DDlEvMXCMlQ7IKlaR9GRrI8C4qwSu3Z+pltzDHzlZWvCi DBR2Qy5baKXhJ/CUjoxNa+sxKcBuJ0TROndAr7h3G+aJQk4+M28Cmmc2HhTUrXkk4l0a eJJg== 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=fzEGBZG+zdVjSuCFCS/LYQzrP7ini8kXo2RE/T0h8Tk=; b=GNzIy7YepU+PLTRfdLQtY6FUJ3ILcCg+elwry+axDJmDwWXpLHSNfNqwE2tA0Y4/Iz IcPacMiDCebg9DjIZ8kKxgGYKzqqNq4wNQp8UBUtuaOWBESHWDQpbG6+FChwV+mvOqiC QFoVoU2Revum1aZ2VdSCvX412vy01clolfunwzSmP42TEQcTo666IgtivxtN3uuEofA3 CRWVEKRFr2McqOLlvscxF51omPsYFHJTEE/OIYdBG8SrYRau4QRsDIJGrvPXMfjfiRjQ 3g4XLZjTBfhX/0oMfhLW+SglFyN7wLWizmUcUezBfAz86wrUoWfV6Q6+p5PISlOMV4Z2 u8Tw== X-Gm-Message-State: AOAM530vP2L6rogEEQuD5lIyjEcAMOwdDVzOJAHMe4IALHlSRo1G2gMu vFKcFis9Y2hEo+rA5sANnBP4aWWfu4o= X-Google-Smtp-Source: ABdhPJycegMgB5IRU0qp4Wk6Swngdp4yc6BsIIu6kt6Bhe0gBWAa96cGMrFI/UgQJDjE7p6wucPKRA== X-Received: by 2002:aa7:82ce:0:b029:142:2501:35cb with SMTP id f14-20020aa782ce0000b0290142250135cbmr15951751pfn.43.1604196221601; Sat, 31 Oct 2020 19:03:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 19:03:41 -0700 (PDT) From: Carlo Holl Date: Sat, 31 Oct 2020 19:02:29 -0700 Message-Id: <20201101020236.1108-9-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=WNQPCpI3; 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: eJSqNFL3rfp3 * gnu/packages/haskell-xyz.scm (ghc-text-short): New variable. --- gnu/packages/haskell-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index 85ed28625a..7b49cac093 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -8911,6 +8911,45 @@ 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