diff --git a/core/src/zexpr.sld b/core/src/zexpr.sld index 6089fa1..1107fd0 100644 --- a/core/src/zexpr.sld +++ b/core/src/zexpr.sld @@ -22,7 +22,7 @@ zexp-context-register-items zexp zexp-quote-inner zexp-unquote zexp-add-unquote-handler zexp-unwrap - zexp-with-injected-context zexp-with-context) + zexp-with-injected-context) (begin ;; A zexp (concept inspired from Guix g-expressions) is represented as a @@ -70,13 +70,13 @@ (value zexp-evaluation-value) (drvs zexp-evaluation-drvs) (srcs zexp-evaluation-srcs)) - + (define-record-printer ( zeval out) (fprintf out "#" (zexp-evaluation-value zeval) (zexp-evaluation-drvs zeval) (zexp-evaluation-srcs zeval))) - + ;; Adds any new items from a list of sources and an alist of derivations to the current `++*zexp-context*++`. ;; drvs is an alist of derivation object to output. name. + ;; TODO(puck): 'spensive? @@ -145,10 +145,6 @@ (define (zexp-with-injected-context val drvs srcs) (make-zexp (lambda () (zexp-context-register-items drvs srcs) ((zexp-thunk val))) (lambda (port) (write val port)))) - (define (zexp-with-context fn) - (parameterize ((*zexp-context* (make-zexp-context '() '()))) - (let ((result (fn))) (list result (zexp-context-drvs (*zexp-context*)) (zexp-context-srcs (*zexp-context*)))))) - ; If trying to quote a pair, we return a cons with both arguments recursively quoted. ; When an zexp-unquote (e.g. #~) is encountered, it is replaced with a call to the zexp-unquote procedure. (define-syntax zexp-quote-inner