From e56462f9eb26ea4e959fe77175c8a124a6d6b8af Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 4 Jun 2019 11:05:30 +0200 Subject: spec: Rename dolog and pr. * modules/language/python/spec.scm (dolog): Rename this variable... (*python-debug*): ...to this. (pr): Rename this procedure... (trace): ...to this. (logging-compile): Adjust. --- modules/language/python/spec.scm | 10 +++++----- 1 file 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." -- cgit v1.2.3