diff --git a/scheme/file.sld b/scheme/file.sld index 0a083341..e5a90e5f 100644 --- a/scheme/file.sld +++ b/scheme/file.sld @@ -21,7 +21,7 @@ (define (with-output-to-file string thunk) ;; Have to do this the long way since parameterize is not available (let ((old (current-output-port)) - (new (current-output-port ' (open-output-file string)))) + (new ((current-output-port ') (open-output-file string)))) (dynamic-wind (lambda () (current-output-port ' new)) thunk diff --git a/test2.scm b/test2.scm index 37702a9d..f966bc8e 100644 --- a/test2.scm +++ b/test2.scm @@ -1,6 +1,6 @@ -;(import (scheme base) -; (scheme file) -; (scheme write)) +(import (scheme base) + (scheme file) + (scheme write)) ; TODO: I think this compiles OK (test), but interpreter does not like it: ;cyclone> ( call-with-output-file "test.txt" (lambda () #f)) @@ -32,7 +32,7 @@ (define my-param (my-make-parameter (current-output-port)));(Cyc-stdout))) (define old (my-param)) -(define new (my-param ' (open-output-file "test.txt"))) +(define new ((my-param ') (open-output-file "test.txt"))) ; The next line seems to crash in icyc but not in compiled code (until write, at least). what's going on?? (my-param ' new) (write 'test (my-param))