From 806e76ad786231bb88cbc7ec244fd564ed50f9c6 Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Sat, 21 May 2016 17:18:35 +1200 Subject: [PATCH 3/3] Make `repository-path` a proper parameter This makes it compatible with the new `convert?` and `set?` arguments that parameterize uses to separately convert and then change a parameter's value. See #1227 and a94b69e. --- eval.scm | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/eval.scm b/eval.scm index c4755c5..fba6d5d 100644 --- a/eval.scm +++ b/eval.scm @@ -1172,19 +1172,15 @@ [else p] ) ) ) ) ) ) ) (define repository-path - (let ((rpath - (if (##sys#fudge 22) ; private repository? - (foreign-value "C_private_repository_path()" c-string) - (or (get-environment-variable repository-environment-variable) - (chicken-prefix - (##sys#string-append - "lib/chicken/" - (##sys#number->string (##sys#fudge 42))) ) - install-egg-home)))) - (lambda (#!optional val) - (if val - (set! rpath val) - rpath)))) + (make-parameter + (if (##sys#fudge 22) ; private repository? + (foreign-value "C_private_repository_path()" c-string) + (or (get-environment-variable repository-environment-variable) + (chicken-prefix + (##sys#string-append + "lib/chicken/" + (##sys#number->string (##sys#fudge 42)))) + install-egg-home)))) (define ##sys#repository-path repository-path) -- 2.8.1