1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

`define-public' is no a longer curried definition by default.

* module/ice-9/boot-9.scm (define-public): Remove currying functionality.
* module/ice-9/curried-definitions.scm (define-public): New export.
This commit is contained in:
Ian Price 2012-09-04 13:18:58 +01:00
parent 068adc1980
commit 4aaceda29f
2 changed files with 16 additions and 2 deletions

View file

@ -3321,7 +3321,9 @@ module '(ice-9 q) '(make-q q-length))}."
(define-syntax define-public
(syntax-rules ()
((_ (name . args) . body)
(define-public name (lambda args . body)))
(begin
(define name (lambda args . body))
(export name)))
((_ name val)
(begin
(define name val)

View file

@ -16,7 +16,8 @@
(define-module (ice-9 curried-definitions)
#:replace ((cdefine . define)
(cdefine* . define*)))
(cdefine* . define*)
define-public))
(define-syntax cdefine
(syntax-rules ()
@ -39,3 +40,14 @@
(lambda* rest body body* ...)))
((_ . rest)
(define* . rest))))
(define-syntax define-public
(syntax-rules ()
((_ (name . args) . body)
(begin
(cdefine (name . args) . body)
(export name)))
((_ name val)
(begin
(define name val)
(export name)))))