diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2019-06-04 11:05:30 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2019-06-04 11:05:30 +0200 |
commit | e56462f9eb26ea4e959fe77175c8a124a6d6b8af (patch) | |
tree | 37bafbbea890de68523f4d5418ef8151ebc9afb7 | |
parent | 3ec70abe240d35a36ef8f246e350b16ee06fc725 (diff) |
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.
-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." |