mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
Update copyright.
Point to manual in commentary; nfc.
This commit is contained in:
parent
0706ae06dc
commit
6be07c5278
13 changed files with 692 additions and 643 deletions
101
srfi/srfi-1.scm
101
srfi/srfi-1.scm
|
@ -1,58 +1,59 @@
|
||||||
;;;; srfi-1.scm --- SRFI-1 procedures for Guile
|
;;; srfi-1.scm --- List Library
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
;;; Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||||
;;; Date: 2001-06-06
|
;;; Date: 2001-06-06
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;;; This is an implementation of SRFI-1 (List Library)
|
;; This is an implementation of SRFI-1 (List Library).
|
||||||
;;;
|
;;
|
||||||
;;; All procedures defined in SRFI-1, which are not already defined in
|
;; All procedures defined in SRFI-1, which are not already defined in
|
||||||
;;; the Guile core library, are exported. The procedures in this
|
;; the Guile core library, are exported. The procedures in this
|
||||||
;;; implementation work, but they have not been tuned for speed or
|
;; implementation work, but they have not been tuned for speed or
|
||||||
;;; memory usage.
|
;; memory usage.
|
||||||
;;;
|
;;
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -1051,3 +1052,5 @@
|
||||||
|
|
||||||
(define (lset-diff+intersection! = list1 . rest)
|
(define (lset-diff+intersection! = list1 . rest)
|
||||||
(apply lset-diff+intersection = list1 rest)) ; XXX:optimize
|
(apply lset-diff+intersection = list1 rest)) ; XXX:optimize
|
||||||
|
|
||||||
|
;;; srfi-1.scm ends here
|
||||||
|
|
132
srfi/srfi-10.scm
132
srfi/srfi-10.scm
|
@ -1,70 +1,72 @@
|
||||||
;;;; srfi-10.scm --- SRFI-10 read hash extension for Guile
|
;;; srfi-10.scm --- Hash-Comma Reader Extension
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;;; This module implements the syntax extension #,(), also called
|
;; This module implements the syntax extension #,(), also called
|
||||||
;;; hash-comma, which is defined in SRFI-10.
|
;; hash-comma, which is defined in SRFI-10.
|
||||||
;;;
|
;;
|
||||||
;;; The support for SRFI-10 consists of the procedure
|
;; The support for SRFI-10 consists of the procedure
|
||||||
;;; `define-reader-ctor' for defining new reader constructors and the
|
;; `define-reader-ctor' for defining new reader constructors and the
|
||||||
;;; read syntax form
|
;; read syntax form
|
||||||
;;;
|
;;
|
||||||
;;; #,(<ctor> <datum> ...)
|
;; #,(<ctor> <datum> ...)
|
||||||
;;;
|
;;
|
||||||
;;; where <ctor> must be a symbol for which a read constructor was
|
;; where <ctor> must be a symbol for which a read constructor was
|
||||||
;;; defined previously.
|
;; defined previously.
|
||||||
;;;
|
;;
|
||||||
;;; Example:
|
;; Example:
|
||||||
;;;
|
;;
|
||||||
;;; (define-reader-ctor 'file open-input-file)
|
;; (define-reader-ctor 'file open-input-file)
|
||||||
;;; (define f '#,(file "/etc/passwd"))
|
;; (define f '#,(file "/etc/passwd"))
|
||||||
;;; (read-line f)
|
;; (read-line f)
|
||||||
;;; =>
|
;; =>
|
||||||
;;; "root:x:0:0:root:/root:/bin/bash"
|
;; "root:x:0:0:root:/root:/bin/bash"
|
||||||
;;;
|
;;
|
||||||
;;; Please note the quote before the #,(file ...) expression. This is
|
;; Please note the quote before the #,(file ...) expression. This is
|
||||||
;;; necessary because ports are not self-evaluating in Guile.
|
;; necessary because ports are not self-evaluating in Guile.
|
||||||
|
;;
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -108,3 +110,5 @@
|
||||||
;; Install the hash extension.
|
;; Install the hash extension.
|
||||||
;;
|
;;
|
||||||
(read-hash-extend #\, hash-comma)
|
(read-hash-extend #\, hash-comma)
|
||||||
|
|
||||||
|
;;; srfi-10.scm ends here
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
;;;; srfi-11.scm --- SRFI-11 procedures for Guile
|
;;; srfi-11.scm --- let-values and let*-values
|
||||||
|
|
||||||
;;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@
|
||||||
;; values returned by `bar'. All of these are available to `baz'.
|
;; values returned by `bar'. All of these are available to `baz'.
|
||||||
;;
|
;;
|
||||||
;; let*-values : let-values :: let* : let
|
;; let*-values : let-values :: let* : let
|
||||||
|
;;
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -275,3 +277,5 @@
|
||||||
; (if (null? vars)
|
; (if (null? vars)
|
||||||
; `(begin ,@body)
|
; `(begin ,@body)
|
||||||
; (let-values-helper vars body)))
|
; (let-values-helper vars body)))
|
||||||
|
|
||||||
|
;;; srfi-11.scm ends here
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
;;; srfi-13.scm --- SRFI-13 procedures for Guile
|
;;; srfi-13.scm --- String Library
|
||||||
;;;
|
|
||||||
;;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -173,3 +173,4 @@
|
||||||
(string-length s))))
|
(string-length s))))
|
||||||
(hash (string-upcase (substring/shared s start end)) bound))))
|
(hash (string-upcase (substring/shared s start end)) bound))))
|
||||||
|
|
||||||
|
;;; srfi-13.scm ends here
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
;;; srfi-14.scm --- SRFI-14 procedures for Guile
|
;;; srfi-14.scm --- Character-set Library
|
||||||
;;;
|
|
||||||
;;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
|
135
srfi/srfi-16.scm
135
srfi/srfi-16.scm
|
@ -1,74 +1,75 @@
|
||||||
;;;; srfi-16.scm --- `case-lambda' for Guile
|
;;; srfi-16.scm --- case-lambda
|
||||||
|
|
||||||
;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;; Implementation of SRFI-16. `case-lambda' is a syntactic form
|
|
||||||
;;; which permits writing functions acting different according to the
|
|
||||||
;;; number of arguments passed.
|
|
||||||
;;;
|
|
||||||
;;; The syntax of the `case-lambda' form is defined in the following
|
|
||||||
;;; EBNF grammar.
|
|
||||||
;;;
|
|
||||||
;;; <case-lambda>
|
|
||||||
;;; --> (case-lambda <case-lambda-clause>)
|
|
||||||
;;; <case-lambda-clause>
|
|
||||||
;;; --> (<signature> <definition-or-command>*)
|
|
||||||
;;; <signature>
|
|
||||||
;;; --> (<identifier>*)
|
|
||||||
;;; | (<identifier>* . <identifier>)
|
|
||||||
;;; | <identifier>
|
|
||||||
;;;
|
|
||||||
;;; The value returned by a `case-lambda' form is a procedure which
|
|
||||||
;;; matches the number of actual arguments against the signatures in
|
|
||||||
;;; the various clauses, in order. The first matching clause is
|
|
||||||
;;; selected, the corresponding values from the actual parameter list
|
|
||||||
;;; are bound to the variable names in the clauses and the body of the
|
|
||||||
;;; clause is evaluated.
|
|
||||||
|
|
||||||
;;; Author: Martin Grabmueller
|
;;; Author: Martin Grabmueller
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; Implementation of SRFI-16. `case-lambda' is a syntactic form
|
||||||
|
;; which permits writing functions acting different according to the
|
||||||
|
;; number of arguments passed.
|
||||||
|
;;
|
||||||
|
;; The syntax of the `case-lambda' form is defined in the following
|
||||||
|
;; EBNF grammar.
|
||||||
|
;;
|
||||||
|
;; <case-lambda>
|
||||||
|
;; --> (case-lambda <case-lambda-clause>)
|
||||||
|
;; <case-lambda-clause>
|
||||||
|
;; --> (<signature> <definition-or-command>*)
|
||||||
|
;; <signature>
|
||||||
|
;; --> (<identifier>*)
|
||||||
|
;; | (<identifier>* . <identifier>)
|
||||||
|
;; | <identifier>
|
||||||
|
;;
|
||||||
|
;; The value returned by a `case-lambda' form is a procedure which
|
||||||
|
;; matches the number of actual arguments against the signatures in
|
||||||
|
;; the various clauses, in order. The first matching clause is
|
||||||
|
;; selected, the corresponding values from the actual parameter list
|
||||||
|
;; are bound to the variable names in the clauses and the body of the
|
||||||
|
;; clause is evaluated.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define-module (srfi srfi-16)
|
(define-module (srfi srfi-16)
|
||||||
:export-syntax (case-lambda))
|
:export-syntax (case-lambda))
|
||||||
|
|
||||||
|
@ -146,3 +147,5 @@
|
||||||
(let ((,length-name (length ,args-name)))
|
(let ((,length-name (length ,args-name)))
|
||||||
(cond ,@(gen-clauses clauses length-name args-name))))))
|
(cond ,@(gen-clauses clauses length-name args-name))))))
|
||||||
proc)))
|
proc)))
|
||||||
|
|
||||||
|
;;; srfi-16.scm ends here
|
||||||
|
|
|
@ -1,46 +1,47 @@
|
||||||
;;;; srfi-17.scm --- SRFI-17 procedures for Guile
|
;;; srfi-17.scm --- Generalized set!
|
||||||
|
|
||||||
;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;; Originally by Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
|
;;
|
||||||
;;;
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; (at your option) any later version.
|
||||||
;;; (at your option) any later version.
|
;;
|
||||||
;;;
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; General Public License for more details.
|
||||||
;;; General Public License for more details.
|
;;
|
||||||
;;;
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; Boston, MA 02111-1307 USA
|
||||||
;;; Boston, MA 02111-1307 USA
|
;;
|
||||||
;;;
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;;
|
||||||
;;;
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; linking the GUILE library code into it.
|
||||||
;;; linking the GUILE library code into it.
|
;;
|
||||||
;;;
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;;
|
||||||
;;;
|
;; This exception applies only to the code released by the
|
||||||
;;; This exception applies only to the code released by the
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; this exception notice from them.
|
||||||
;;; this exception notice from them.
|
;;
|
||||||
;;;
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; If you do not wish that, delete this exception notice.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
|
||||||
|
;;; Author: Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -61,6 +62,8 @@
|
||||||
;; setter") via the `getter-with-setter' procedure. This procedure is
|
;; setter") via the `getter-with-setter' procedure. This procedure is
|
||||||
;; also specified in the SRFI. Using it avoids the described
|
;; also specified in the SRFI. Using it avoids the described
|
||||||
;; problems.
|
;; problems.
|
||||||
|
;;
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -123,3 +126,5 @@
|
||||||
(define cddddr (getter-with-setter cddddr (compose-setter set-cdr! cdddr)))
|
(define cddddr (getter-with-setter cddddr (compose-setter set-cdr! cdddr)))
|
||||||
(define string-ref (getter-with-setter string-ref string-set!))
|
(define string-ref (getter-with-setter string-ref string-set!))
|
||||||
(define vector-ref (getter-with-setter vector-ref vector-set!))
|
(define vector-ref (getter-with-setter vector-ref vector-set!))
|
||||||
|
|
||||||
|
;;; srfi-17.scm ends here
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
;;; srfi-19.scm --- SRFI-19 procedures for Guile
|
;;; srfi-19.scm --- Time/Date Library
|
||||||
;;;
|
|
||||||
;;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
;;; Author: Rob Browning <rlb@cs.utexas.edu>
|
||||||
|
;;; Originally from SRFI reference implementation by Will Fitzgerald.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; Originally from SRFI reference implementation by Will Fitzgerald.
|
|
||||||
;; Ported to Guile by Rob Browning <rlb@cs.utexas.edu>.
|
|
||||||
;;
|
|
||||||
;; This module is fully documented in the Guile Reference Manual.
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
|
@ -1,48 +1,56 @@
|
||||||
;;;; srfi-2.scm --- SRFI-2 procedures for Guile
|
;;; srfi-2.scm --- and-let*
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(define-module (srfi srfi-2)
|
(define-module (srfi srfi-2)
|
||||||
:use-module (ice-9 and-let-star)
|
:use-module (ice-9 and-let-star)
|
||||||
:re-export-syntax (and-let*))
|
:re-export-syntax (and-let*))
|
||||||
|
|
||||||
(cond-expand-provide (current-module) '(srfi-2))
|
(cond-expand-provide (current-module) '(srfi-2))
|
||||||
|
|
||||||
|
;;; srfi-2.scm ends here
|
||||||
|
|
|
@ -1,54 +1,55 @@
|
||||||
;;;; srfi-4.scm --- Homogeneous numeric vector datatypes.
|
;;; srfi-4.scm --- Homogeneous Numeric Vector Datatypes
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
;;; Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;;; This module implements homogeneous numeric vectors as defined in SRFI-4.
|
;; This module implements homogeneous numeric vectors as defined in SRFI-4.
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;;; Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
|
||||||
|
|
||||||
(define-module (srfi srfi-4)
|
(define-module (srfi srfi-4)
|
||||||
:export (
|
:export (
|
||||||
;;; Unsigned 8-bit vectors.
|
;;; Unsigned 8-bit vectors.
|
||||||
|
@ -197,3 +198,5 @@
|
||||||
(read-hash-extend #\f hash-f)
|
(read-hash-extend #\f hash-f)
|
||||||
(read-hash-extend #\u hash-u)
|
(read-hash-extend #\u hash-u)
|
||||||
(read-hash-extend #\s hash-s)
|
(read-hash-extend #\s hash-s)
|
||||||
|
|
||||||
|
;;; srfi-4.scm ends here
|
||||||
|
|
|
@ -1,45 +1,51 @@
|
||||||
;;;; srfi-6.scm --- SRFI-6 procedures for Guile
|
;;; srfi-6.scm --- Basic String Ports
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(define-module (srfi srfi-6))
|
(define-module (srfi srfi-6))
|
||||||
|
|
||||||
|
@ -47,3 +53,5 @@
|
||||||
;; is needed, and this file is just a placeholder.
|
;; is needed, and this file is just a placeholder.
|
||||||
|
|
||||||
(cond-expand-provide (current-module) '(srfi-6))
|
(cond-expand-provide (current-module) '(srfi-6))
|
||||||
|
|
||||||
|
;;; srfi-6.scm ends here
|
||||||
|
|
|
@ -1,48 +1,56 @@
|
||||||
;;;; srfi-8.scm --- SRFI-8 procedures for Guile
|
;;; srfi-8.scm --- receive
|
||||||
|
|
||||||
;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;
|
;;
|
||||||
;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;
|
;;
|
||||||
;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;
|
;;
|
||||||
;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;
|
;;
|
||||||
;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;
|
;;
|
||||||
;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;
|
;;
|
||||||
;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;
|
;;
|
||||||
;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;
|
;;
|
||||||
;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This module is fully documented in the Guile Reference Manual.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(define-module (srfi srfi-8)
|
(define-module (srfi srfi-8)
|
||||||
:use-module (ice-9 receive)
|
:use-module (ice-9 receive)
|
||||||
:re-export-syntax (receive))
|
:re-export-syntax (receive))
|
||||||
|
|
||||||
(cond-expand-provide (current-module) '(srfi-8))
|
(cond-expand-provide (current-module) '(srfi-8))
|
||||||
|
|
||||||
|
;;; srfi-8.scm ends here
|
||||||
|
|
160
srfi/srfi-9.scm
160
srfi/srfi-9.scm
|
@ -1,85 +1,85 @@
|
||||||
;;;; srfi-9.scm --- SRFI-9 procedures for Guile
|
;;; srfi-9.scm --- define-record-type
|
||||||
;;;;
|
|
||||||
;;;; Copyright (C) 2001 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
;; This program is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU General Public License as
|
;; modify it under the terms of the GNU General Public License as
|
||||||
;;;; published by the Free Software Foundation; either version 2, or
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
;;;; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;;;;
|
;;
|
||||||
;;;; This program is distributed in the hope that it will be useful,
|
;; This program is distributed in the hope that it will be useful,
|
||||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
;;;; General Public License for more details.
|
;; General Public License for more details.
|
||||||
;;;;
|
;;
|
||||||
;;;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;;; along with this software; see the file COPYING. If not, write to
|
;; along with this software; see the file COPYING. If not, write to
|
||||||
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
;;;; Boston, MA 02111-1307 USA
|
;; Boston, MA 02111-1307 USA
|
||||||
;;;;
|
;;
|
||||||
;;;; As a special exception, the Free Software Foundation gives permission
|
;; As a special exception, the Free Software Foundation gives permission
|
||||||
;;;; for additional uses of the text contained in its release of GUILE.
|
;; for additional uses of the text contained in its release of GUILE.
|
||||||
;;;;
|
;;
|
||||||
;;;; The exception is that, if you link the GUILE library with other files
|
;; The exception is that, if you link the GUILE library with other files
|
||||||
;;;; to produce an executable, this does not by itself cause the
|
;; to produce an executable, this does not by itself cause the
|
||||||
;;;; resulting executable to be covered by the GNU General Public License.
|
;; resulting executable to be covered by the GNU General Public License.
|
||||||
;;;; Your use of that executable is in no way restricted on account of
|
;; Your use of that executable is in no way restricted on account of
|
||||||
;;;; linking the GUILE library code into it.
|
;; linking the GUILE library code into it.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception does not however invalidate any other reasons why
|
;; This exception does not however invalidate any other reasons why
|
||||||
;;;; the executable file might be covered by the GNU General Public License.
|
;; the executable file might be covered by the GNU General Public License.
|
||||||
;;;;
|
;;
|
||||||
;;;; This exception applies only to the code released by the
|
;; This exception applies only to the code released by the
|
||||||
;;;; Free Software Foundation under the name GUILE. If you copy
|
;; Free Software Foundation under the name GUILE. If you copy
|
||||||
;;;; code from other Free Software Foundation releases into a copy of
|
;; code from other Free Software Foundation releases into a copy of
|
||||||
;;;; GUILE, as the General Public License permits, the exception does
|
;; GUILE, as the General Public License permits, the exception does
|
||||||
;;;; not apply to the code that you add in this way. To avoid misleading
|
;; not apply to the code that you add in this way. To avoid misleading
|
||||||
;;;; anyone as to the status of such modified files, you must delete
|
;; anyone as to the status of such modified files, you must delete
|
||||||
;;;; this exception notice from them.
|
;; this exception notice from them.
|
||||||
;;;;
|
;;
|
||||||
;;;; If you write modifications of your own for GUILE, it is your choice
|
;; If you write modifications of your own for GUILE, it is your choice
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;;; This module exports the syntactic form `define-record-type', which
|
;; This module exports the syntactic form `define-record-type', which
|
||||||
;;; is the means for creating record types defined in SRFI-9.
|
;; is the means for creating record types defined in SRFI-9.
|
||||||
;;;
|
;;
|
||||||
;;; The syntax of a record type definition is:
|
;; The syntax of a record type definition is:
|
||||||
;;;
|
;;
|
||||||
;;; <record type definition>
|
;; <record type definition>
|
||||||
;;; -> (define-record-type <type name>
|
;; -> (define-record-type <type name>
|
||||||
;;; (<constructor name> <field tag> ...)
|
;; (<constructor name> <field tag> ...)
|
||||||
;;; <predicate name>
|
;; <predicate name>
|
||||||
;;; <field spec> ...)
|
;; <field spec> ...)
|
||||||
;;;
|
;;
|
||||||
;;; <field spec> -> (<field tag> <accessor name>)
|
;; <field spec> -> (<field tag> <accessor name>)
|
||||||
;;; -> (<field tag> <accessor name> <modifier name>)
|
;; -> (<field tag> <accessor name> <modifier name>)
|
||||||
;;;
|
;;
|
||||||
;;; <field tag> -> <identifier>
|
;; <field tag> -> <identifier>
|
||||||
;;; <... name> -> <identifier>
|
;; <... name> -> <identifier>
|
||||||
;;;
|
;;
|
||||||
;;; Usage example:
|
;; Usage example:
|
||||||
;;;
|
;;
|
||||||
;;; guile> (use-modules (srfi srfi-9))
|
;; guile> (use-modules (srfi srfi-9))
|
||||||
;;; guile> (define-record-type :foo (make-foo x) foo?
|
;; guile> (define-record-type :foo (make-foo x) foo?
|
||||||
;;; (x get-x) (y get-y set-y!))
|
;; (x get-x) (y get-y set-y!))
|
||||||
;;; guile> (define f (make-foo 1))
|
;; guile> (define f (make-foo 1))
|
||||||
;;; guile> f
|
;; guile> f
|
||||||
;;; #<:foo x: 1 y: #f>
|
;; #<:foo x: 1 y: #f>
|
||||||
;;; guile> (get-x f)
|
;; guile> (get-x f)
|
||||||
;;; 1
|
;; 1
|
||||||
;;; guile> (set-y! f 2)
|
;; guile> (set-y! f 2)
|
||||||
;;; 2
|
;; 2
|
||||||
;;; guile> (get-y f)
|
;; guile> (get-y f)
|
||||||
;;; 2
|
;; 2
|
||||||
;;; guile> f
|
;; guile> f
|
||||||
;;; #<:foo x: 1 y: 2>
|
;; #<:foo x: 1 y: 2>
|
||||||
;;; guile> (foo? f)
|
;; guile> (foo? f)
|
||||||
;;; #t
|
;; #t
|
||||||
;;; guile> (foo? 1)
|
;; guile> (foo? 1)
|
||||||
;;; #f
|
;; #f
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -112,3 +112,5 @@
|
||||||
(else
|
(else
|
||||||
(error "invalid field spec " spec))))
|
(error "invalid field spec " spec))))
|
||||||
field-specs)))
|
field-specs)))
|
||||||
|
|
||||||
|
;;; srfi-9.scm ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue