From fb23b4a49e9c1f5c15ef0ceb2ee1903ebfddd71a Mon Sep 17 00:00:00 2001 From: Ian Price Date: Tue, 4 Sep 2012 13:18:58 +0100 Subject: [PATCH] `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. --- module/ice-9/boot-9.scm | 4 +++- module/ice-9/curried-definitions.scm | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 5ed543a..cf8252a 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -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) diff --git a/module/ice-9/curried-definitions.scm b/module/ice-9/curried-definitions.scm index d55f1fb..8c684a1 100644 --- a/module/ice-9/curried-definitions.scm +++ b/module/ice-9/curried-definitions.scm @@ -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))))) -- 1.7.7.6