split files
This commit is contained in:
parent
a2fc679fab
commit
9375aadf4b
|
@ -8,6 +8,7 @@ list(APPEND PICLIB_SCHEME_LIBS
|
|||
${PROJECT_SOURCE_DIR}/piclib/scheme/file.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/scheme/case-lambda.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/scheme/lazy.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/scheme/eval.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/scheme/r5rs.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/scheme/null.scm
|
||||
${PROJECT_SOURCE_DIR}/piclib/srfi/1.scm
|
||||
|
|
|
@ -1043,32 +1043,3 @@
|
|||
|
||||
(export guard)
|
||||
|
||||
(define-library (scheme eval)
|
||||
(import (scheme base))
|
||||
|
||||
(define (null-environment n)
|
||||
(if (not (= n 5))
|
||||
(error "unsupported environment version" n)
|
||||
'(scheme null)))
|
||||
|
||||
(define (scheme-report-environment n)
|
||||
(if (not (= n 5))
|
||||
(error "unsupported environment version" n)
|
||||
'(scheme r5rs)))
|
||||
|
||||
(define environment
|
||||
(let ((counter 0))
|
||||
(lambda specs
|
||||
(let ((library-name `(picrin @@my-environment ,counter)))
|
||||
(set! counter (+ counter 1))
|
||||
(eval
|
||||
`(define-library ,library-name
|
||||
,@(map (lambda (spec)
|
||||
`(import ,spec))
|
||||
specs))
|
||||
'(scheme base))
|
||||
library-name))))
|
||||
|
||||
(export null-environment
|
||||
scheme-report-environment
|
||||
environment))
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
(define-library (scheme eval)
|
||||
(import (scheme base))
|
||||
|
||||
(define (null-environment n)
|
||||
(if (not (= n 5))
|
||||
(error "unsupported environment version" n)
|
||||
'(scheme null)))
|
||||
|
||||
(define (scheme-report-environment n)
|
||||
(if (not (= n 5))
|
||||
(error "unsupported environment version" n)
|
||||
'(scheme r5rs)))
|
||||
|
||||
(define environment
|
||||
(let ((counter 0))
|
||||
(lambda specs
|
||||
(let ((library-name `(picrin @@my-environment ,counter)))
|
||||
(set! counter (+ counter 1))
|
||||
(eval
|
||||
`(define-library ,library-name
|
||||
,@(map (lambda (spec)
|
||||
`(import ,spec))
|
||||
specs))
|
||||
'(scheme base))
|
||||
library-name))))
|
||||
|
||||
(export null-environment
|
||||
scheme-report-environment
|
||||
environment))
|
Loading…
Reference in New Issue