diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:40 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:40 -0800 |
commit | 4684239efa63dc1b2c1cbe37ef7d3062029f5532 (patch) | |
tree | 606a687e9279e9bf6048925878968df9875a4973 /Template.scm | |
parent | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff) | |
download | slib-4684239efa63dc1b2c1cbe37ef7d3062029f5532.tar.gz slib-4684239efa63dc1b2c1cbe37ef7d3062029f5532.zip |
Import Upstream version 3b1upstream/3b1
Diffstat (limited to 'Template.scm')
-rw-r--r-- | Template.scm | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/Template.scm b/Template.scm index b006f7a..c61de29 100644 --- a/Template.scm +++ b/Template.scm @@ -23,11 +23,15 @@ ;;@ (implementation-vicinity) should be defined to be the pathname of ;;; the directory where any auxillary files to your Scheme ;;; implementation reside. -(define (implementation-vicinity) - (case (software-type) - ((unix) "/usr/local/src/scheme/") - ((vms) "scheme$src:") - ((ms-dos) "C:\\scheme\\"))) +(define implementation-vicinity + (let ((impl-path + (or (getenv "{TEMPLATE}_IMPLEMENTATION_PATH") + (case (software-type) + ((unix) "/usr/local/src/scheme/") + ((vms) "scheme$src:") + ((ms-dos) "C:\\scheme\\") + (else ""))))) + (lambda () impl-path))) ;;@ (library-vicinity) should be defined to be the pathname of the ;;; directory where files of Scheme library functions reside. @@ -95,8 +99,7 @@ ;@ (define sub-vicinity (case (software-type) - ((vms) (lambda - (vic name) + ((vms) (lambda (vic name) (let ((l (string-length vic))) (if (or (zero? (string-length vic)) (not (char=? #\] (string-ref vic (- l 1))))) @@ -137,6 +140,7 @@ ;(SLIB:LOAD-COMPILED "filename") vicinity srfi-59 + srfi-96 ;; Scheme report features ;; R5RS-compliant implementations should provide all 9 features. @@ -180,11 +184,12 @@ ;; Other common features - srfi ;srfi-0, COND-EXPAND finds all srfi-* + srfi-0 ;srfi-0, COND-EXPAND finds all srfi-* ;;; sicp ;runs code from Structure and ;Interpretation of Computer ;Programs by Abelson and Sussman. -;;; defmacro ;has Common Lisp DEFMACRO + defmacro ;has Common Lisp DEFMACRO +;;; syntax-case ;has syncase:eval and syncase:load ;;; record ;has user defined data structures ;;; string-port ;has CALL-WITH-INPUT-STRING and ;CALL-WITH-OUTPUT-STRING @@ -256,9 +261,6 @@ ;;@ SLIB:EVAL is single argument eval using the top-level (user) environment. (define slib:eval eval) -;; If your implementation provides R4RS macros: -;(define macro:eval slib:eval) -;(define macro:load load) (define *defmacros* (list (cons 'defmacro (lambda (name parms . body) @@ -300,7 +302,6 @@ ;@ (define (defmacro:load <pathname>) (slib:eval-load <pathname> defmacro:eval)) -;; slib:eval-load definition moved to "require.scm" ;@ (define slib:warn (lambda args @@ -386,4 +387,12 @@ ;;@ At this point SLIB:LOAD must be able to load SLIB files. (define slib:load slib:load-source) +;;; If your implementation provides R4RS macros: +;;(define macro:eval slib:eval) +;;(define macro:load slib:load-source) + +;;; If your implementation provides syntax-case macros: +;;(define syncase:eval slib:eval) +;;(define syncase:load slib:load-source) + (slib:load (in-vicinity (library-vicinity) "require")) |