diff options
-rw-r--r-- | modules/language/python/spec.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/language/python/spec.scm b/modules/language/python/spec.scm index be7673e..aa8e346 100644 --- a/modules/language/python/spec.scm +++ b/modules/language/python/spec.scm @@ -13,15 +13,15 @@ #:use-module (language scheme compile-tree-il) #:use-module (language scheme decompile-tree-il) #:use-module (ice-9 rdelim) - #:export (python dolog)) + #:export (python *python-debug*)) ;;; ;;; Language definition ;;; -(define dolog #f) -(define (pr . x) - (when dolog +(define *python-debug* #f) +(define (trace . x) + (when *python-debug* (let () (define port (open-file "log.txt" "a")) (with-output-to-port port @@ -33,7 +33,7 @@ (define (logging-compile int? exp) "Compile the Python expression EXP while optionally logging intermediate values." - (pr (comp int? (pr (python-parser:p (pr exp)))))) + (trace (comp int? (trace (python-parser:p (trace exp)))))) (define (read-or-compile int? port exp) "Compile the Python expression EXP or read a new one from PORT." |