From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: [PATCH v7 11/16] module: Add (scheme sort). Date: Mon, 4 Dec 2023 16:45:16 -0500 Message-ID: <20231204215143.3146-12-maxim.cournoyer@gmail.com> References: <20231204215143.3146-1-maxim.cournoyer@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5990"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Maxim Cournoyer To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Dec 04 22:53:39 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rAGsk-0001I4-VO for guile-devel@m.gmane-mx.org; Mon, 04 Dec 2023 22:53:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAGrn-0000YL-Ip; Mon, 04 Dec 2023 16:52:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAGrO-0000FD-9b for guile-devel@gnu.org; Mon, 04 Dec 2023 16:52:14 -0500 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAGrL-0007r4-8x for guile-devel@gnu.org; Mon, 04 Dec 2023 16:52:13 -0500 Original-Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-42542163a1fso22552591cf.0 for ; Mon, 04 Dec 2023 13:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701726728; x=1702331528; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DCz/SeHYdWk0bZHe/LdOCYrEAtCeMCJmvhCnY3R+iLw=; b=F/SRgYBsDrKya285vzm4byVcaefwzLkpMQTHBRXwbM0tLpnSF43kjyh6pZolbIDOQj gwJNCDT+I647KJ+vPtAnNEWp6Vqzri5RQ1C8llPrLk3V26RKxyKSW/u7gn26XdE0tZCn Bj5ez7KR6ho0WxOKf6jJEdMiOt7NyHpbmPsPTTR5nB3XE6aaIYu5We3n7aGxRwsOGZVv IG/DlNTIPGEpkPEq1HvNVW02Nm8CDPB+4BQV5HcrMddhmaupJ5UQck4N6RCSgiM9Dscv C7nd8lKMV4wcmQ87AmdJ8nX0pzuOFSnZXFgkTrzEYG20hYETNDE3aMnvV6v5zOHUA/ur Yy6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701726728; x=1702331528; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DCz/SeHYdWk0bZHe/LdOCYrEAtCeMCJmvhCnY3R+iLw=; b=M2nu/fhlrc8kkARL9QBzhB+2vU5N1Rq+rp/c/Y8smeuWAyJG2+bV0c/nd+zbpX1+QR SpQEcpklRbZc+ggfO2/9rYCM0x0IEx8B1oehK6RT9eN1rLk6eSWxwmYGS+AubdBEjjnE ucxIDxvDGt43TvlpWx2KdnynRrYROmp3qHkTl9bNy+E3K/VtVhJE2JlBZ3JlVa4robhi VdxZQr7hr+TnaI7O9A3iX5H7muw2F4ArgPLOrqneSy8reWaIWhDQos9AANvzIqrcLgZ+ zi6jECxbyEWIHTaq2ceiRP93WjQwqL68mSkZ7DSK3XWzBq1+CQKf2GjUWZ0k0F+KY47q 3p6w== X-Gm-Message-State: AOJu0Yx+075doqnmvWTP/hn2JLtvE//lK4+uRPV7HDRXU61/WP6KkrYg mKahN/ngTSqSlNbSNIE1fHcYDrGL9XGJjA== X-Google-Smtp-Source: AGHT+IE9782DNZA2S4g9E6zWMCU9th4cmQEOkUz+4o0bs6FtAC/GAA0u63WuuzDLB3a9i37UfQd4xw== X-Received: by 2002:a05:622a:1999:b0:423:86cc:8c85 with SMTP id u25-20020a05622a199900b0042386cc8c85mr276606qtc.35.1701726727820; Mon, 04 Dec 2023 13:52:07 -0800 (PST) Original-Received: from localhost.localdomain (dsl-141-198.b2b2c.ca. [66.158.141.198]) by smtp.gmail.com with ESMTPSA id jd24-20020a05622a719800b00425438e7c5esm2642503qtb.62.2023.12.04.13.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 13:52:07 -0800 (PST) X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204215143.3146-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22197 Archived-At: * module/scheme/sort.sld: New R7RS library shim for (rnrs sorting). * am/bootstrap.am (SOURCES): Register it. * NEWS: Update NEWS. --- (no changes since v5) Changes in v5: - Update NEWS NEWS | 1 + am/bootstrap.am | 1 + module/scheme/sort.sld | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 module/scheme/sort.sld diff --git a/NEWS b/NEWS index 45023d9fb..614a2bc7f 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ the compiler reports it as "possibly unused". ** Add (srfi 126), a hash tables library ** Add (srfi 128), a comparators library ** Add (scheme comparator) +** Add (scheme sort) * Bug fixes diff --git a/am/bootstrap.am b/am/bootstrap.am index ba5cd7291..17e70bff8 100644 --- a/am/bootstrap.am +++ b/am/bootstrap.am @@ -295,6 +295,7 @@ SOURCES = \ scheme/r5rs.scm \ scheme/read.scm \ scheme/repl.scm \ + scheme/sort.sld \ scheme/time.scm \ scheme/write.scm \ \ diff --git a/module/scheme/sort.sld b/module/scheme/sort.sld new file mode 100644 index 000000000..d8b560d1f --- /dev/null +++ b/module/scheme/sort.sld @@ -0,0 +1,21 @@ +;;; sorting.sld --- R7RS library exposing (rnrs sorting). + +;;; Copyright (C) 2023 Free Software Foundation, Inc. +;;; +;;; This library is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU Lesser General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; This library is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this program. If not, see +;;; . + +(define-library (scheme sort) + (export list-sort vector-sort vector-sort!) + (import (rnrs sorting))) -- 2.41.0