chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] use chicken-syntax by default in compiled appl


From: Felix
Subject: [Chicken-hackers] [PATCH] use chicken-syntax by default in compiled applications
Date: Sat, 27 Oct 2012 11:02:26 -0400 (EDT)

This patch implements CR #931.


cheers,
felix
>From 8140d05cbdbc39ed36e3790f80ea5d023bcda031 Mon Sep 17 00:00:00 2001
From: felix <address@hidden>
Date: Sat, 27 Oct 2012 17:00:28 +0200
Subject: [PATCH] Use "chicken-syntax" unit by default. This makes extended
 chicken syntax available to compiled code that invokes
 the evaluator.

---
 c-platform.scm           |    2 +-
 chicken-install.scm      |    2 +-
 chicken-syntax.scm       |    4 +---
 csi.scm                  |    3 ++-
 eval.scm                 |    1 +
 manual/faq               |   10 ----------
 tests/syntax-tests-2.scm |    2 --
 types.db                 |    2 +-
 8 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/c-platform.scm b/c-platform.scm
index fa96c81..0930d11 100644
--- a/c-platform.scm
+++ b/c-platform.scm
@@ -64,7 +64,7 @@
      (bound-to-procedure
        ##sys#profile-entry ##sys#profile-exit) ) ) )
 
-(define units-used-by-default '(library eval)) 
+(define units-used-by-default '(library eval chicken-syntax)) 
 (define words-per-flonum 4)
 (define parameter-limit 1024)
 (define small-parameter-limit 128)
diff --git a/chicken-install.scm b/chicken-install.scm
index 32fae4d..63ef79a 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -26,7 +26,7 @@
 
 (require-library setup-download setup-api)
 (require-library srfi-1 posix data-structures utils irregex ports extras 
srfi-13 files)
-(require-library chicken-syntax)       ; in case an import library reexports 
chicken syntax
+(require-library chicken-syntax) ; OBSOLETE (but left to allow older chicken's 
to bootstrap)
 (require-library chicken-ffi-syntax)   ; same reason, also for filling 
modules.db
 
 (module main ()
diff --git a/chicken-syntax.scm b/chicken-syntax.scm
index 9b283cc..5de86f0 100644
--- a/chicken-syntax.scm
+++ b/chicken-syntax.scm
@@ -35,9 +35,7 @@
   (no-bound-checks)
   (no-procedure-checks))
 
-(##sys#provide
- 'chicken-more-macros                  ; historical, remove later
- 'chicken-syntax)
+(##sys#provide 'chicken-syntax)
 
 
 ;;; Non-standard macros:
diff --git a/csi.scm b/csi.scm
index b7538e6..1d5f64b 100644
--- a/csi.scm
+++ b/csi.scm
@@ -26,7 +26,8 @@
 
 
 (declare
-  (uses chicken-syntax ports extras)
+  (uses chicken-syntax)        ; OBSOLETE (but left to allow older chicken's 
to bootstrap)
+  (uses ports extras)
   (usual-integrations)
   (disable-interrupts)
   (compile-syntax)
diff --git a/eval.scm b/eval.scm
index 9ae1c8b..66021ee 100644
--- a/eval.scm
+++ b/eval.scm
@@ -70,6 +70,7 @@
 
 (define default-dynamic-load-libraries
   `(,(string-append "lib" install-lib-name)))
+
 (define-constant cygwin-default-dynamic-load-libraries '("cygchicken-0"))
 (define-constant macosx-load-library-extension ".dylib")
 (define-constant windows-load-library-extension ".dll")
diff --git a/manual/faq b/manual/faq
index 6f178cb..b854aae 100644
--- a/manual/faq
+++ b/manual/faq
@@ -798,16 +798,6 @@ runtime and, if the file loaded is a Scheme source code 
file
 (instead of a shared object), it will be
 interpreted (even if the caller program is compiled).
 
-==== How do I use extended (non-standard) syntax in evaluated code at run-time?
-
-Normally, only standard Scheme syntax is available to the evaluator. To
-use the extensions provided in the CHICKEN compiler and interpreter,
-add:
-
-<enscript highlight=scheme>
-(require-library chicken-syntax)
-</enscript>
-
 === Extensions 
 
 ==== Where is "chicken-setup" ?
diff --git a/tests/syntax-tests-2.scm b/tests/syntax-tests-2.scm
index 7eb2be7..a273dcb 100644
--- a/tests/syntax-tests-2.scm
+++ b/tests/syntax-tests-2.scm
@@ -1,6 +1,4 @@
 ;;;; syntax-tests-2.scm - tests using extended syntax at runtime
 
-(require-library chicken-syntax)
-
 (eval '(define-record-type x (make x) x? (x get-x)))
 (assert (eq? 'yes (get-x (make 'yes))))
diff --git a/types.db b/types.db
index 20fc763..a903b16 100644
--- a/types.db
+++ b/types.db
@@ -1555,7 +1555,7 @@
 
 ;; posix
 
-(_exit (procedure _exit (fixnum) noreturn))
+(_exit (procedure _exit (#!optional fixnum) noreturn))
 (call-with-input-pipe (#(procedure #:enforce) call-with-input-pipe (string 
(procedure (input-port) . *) #!optional symbol) . *))
 (call-with-output-pipe (#(procedure #:enforce) call-with-output-pipe (string 
(procedure (input-port) . *) #!optional symbol) . *))
 (change-directory (#(procedure #:clean #:enforce) change-directory (string) 
string))
-- 
1.7.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]