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.
This commit is contained in:
parent
33dd8f3b99
commit
5116f45fbb
|
@ -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 <janneke@gnu.org>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(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
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
;;; -*-scheme-*-
|
||||
|
||||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; portable matcher
|
||||
|
||||
(mes-use-module (mes syntax))
|
||||
(include-from-path "mes/match.scm")
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue