mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-10 11:20:28 +02:00
define* in psyntax
* module/ice-9/optargs.scm: * module/ice-9/psyntax-pp.scm: * module/ice-9/psyntax.scm: Make define* available in the default environment, as lambda* is available there.
This commit is contained in:
parent
15ab466299
commit
97bc28b60a
3 changed files with 4934 additions and 4890 deletions
|
@ -59,12 +59,11 @@
|
||||||
|
|
||||||
(define-module (ice-9 optargs)
|
(define-module (ice-9 optargs)
|
||||||
#:use-module (system base pmatch)
|
#:use-module (system base pmatch)
|
||||||
#:re-export (lambda*)
|
#:re-export (lambda* define*)
|
||||||
#:export (let-optional
|
#:export (let-optional
|
||||||
let-optional*
|
let-optional*
|
||||||
let-keywords
|
let-keywords
|
||||||
let-keywords*
|
let-keywords*
|
||||||
define*
|
|
||||||
define*-public
|
define*-public
|
||||||
defmacro*
|
defmacro*
|
||||||
defmacro*-public))
|
defmacro*-public))
|
||||||
|
@ -256,11 +255,6 @@
|
||||||
;; Of course, define*[-public] also supports #:rest and #:allow-other-keys
|
;; Of course, define*[-public] also supports #:rest and #:allow-other-keys
|
||||||
;; in the same way as lambda*.
|
;; in the same way as lambda*.
|
||||||
|
|
||||||
(define-syntax define*
|
|
||||||
(syntax-rules ()
|
|
||||||
((_ (id . args) b0 b1 ...)
|
|
||||||
(define id (lambda* args b0 b1 ...)))))
|
|
||||||
|
|
||||||
(define-syntax define*-public
|
(define-syntax define*-public
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ (id . args) b0 b1 ...)
|
((_ (id . args) b0 b1 ...)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2678,3 +2678,8 @@
|
||||||
(syntax e))
|
(syntax e))
|
||||||
((_ x (... ...))
|
((_ x (... ...))
|
||||||
(syntax (e x (... ...)))))))))))
|
(syntax (e x (... ...)))))))))))
|
||||||
|
|
||||||
|
(define-syntax define*
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ (id . args) b0 b1 ...)
|
||||||
|
(define id (lambda* args b0 b1 ...)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue