From 67ac2f92e117f2214169732071c77c25886f6b7c Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 30 Dec 2020 16:35:35 +0100 Subject: [PATCH] DRAFT mes: Remove (mes match). * mes/module/mes/match.scm: Move to ... * mes/module/ice-9/match.scm: ...here. Add Guile module header. * tests/match.test (tests): Update accordingly. --- mes/module/{mes => ice-9}/match.scm | 33 +++++++++++++++++++++++++++-- mes/module/mes/match.mes | 26 ----------------------- tests/match.test | 10 +-------- 3 files changed, 32 insertions(+), 37 deletions(-) rename mes/module/{mes => ice-9}/match.scm (96%) delete mode 100644 mes/module/mes/match.mes diff --git a/mes/module/mes/match.scm b/mes/module/ice-9/match.scm similarity index 96% rename from mes/module/mes/match.scm rename to mes/module/ice-9/match.scm index a89cb9a4..2686f428 100644 --- a/mes/module/mes/match.scm +++ b/mes/module/ice-9/match.scm @@ -1,5 +1,32 @@ -;;; match.scm -- portable hygienic pattern matcher -*- coding: utf-8; mode: scheme -*- -;; +;;; GNU Mes --- Maxwell Equations of Software +;;; Copyright © 2016,2018,2020 Jan (janneke) Nieuwenhuizen +;;; +;;; This file is part of GNU Mes. +;;; +;;; GNU Mes is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Mes 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 General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Mes. If not, see . + +(define-module (ice-9 match) + #:export (match match-lambda match-lambda* match-define + match-let match-let* match-letrec + define-structure define-const-structure + match:andmap + match:error match:set-error + match:error-control match:set-error-control + match:structure-control match:set-structure-control)) + +;;; Commentary: + ;; This code is written by Alex Shinn and placed in the ;; Public Domain. All warranties are disclaimed. @@ -186,6 +213,8 @@ ;;> @example{(match '(a (a (a b))) ((x *** 'b) x))} ;;> @example{(match '(a (b) (c (d e) (f g))) ((x *** 'g) x))} +;;; Code: + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Notes diff --git a/mes/module/mes/match.mes b/mes/module/mes/match.mes deleted file mode 100644 index d8eb2e0c..00000000 --- a/mes/module/mes/match.mes +++ /dev/null @@ -1,26 +0,0 @@ -;;; -*-scheme-*- - -;;; GNU Mes --- Maxwell Equations of Software -;;; Copyright © 2016 Jan (janneke) Nieuwenhuizen -;;; -;;; This file is part of GNU Mes. -;;; -;;; GNU Mes is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Mes 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 General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Mes. If not, see . - -;;; Commentary: - -;;; portable matcher - -(mes-use-module (mes syntax)) -(include-from-path "mes/match.scm") diff --git a/tests/match.test b/tests/match.test index 602760b7..83ee16a2 100755 --- a/tests/match.test +++ b/tests/match.test @@ -24,17 +24,9 @@ exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests ;;; along with GNU Mes. If not, see . (define-module (tests match) - #:use-module (mes mes-0) + #:use-module (ice-9 match) #:use-module (mes test)) -(mes-use-module (mes match)) -(mes-use-module (mes test)) - -(cond-expand - (guile - (use-modules (ice-9 match))) - (mes)) - (pass-if "first dummy" #t) (pass-if-not "second dummy" #f)