summaryrefslogtreecommitdiff
path: root/modules/language/python/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/compile.scm')
-rw-r--r--modules/language/python/compile.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 821389c..e291e34 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -281,12 +281,12 @@
(fold f (f (car l) init) (cdr l))
init))
-(define do-pr #t)
+(define do-pr #f)
(define (pr . x)
(if do-pr
(let ()
- (define port (open-file "/home/stis/src/python-on-guile/log.txt" "a"))
+ (define port (open-file "/home/stis/src/python-on-guile/modules/log.txt" "a"))
(with-output-to-port port
(lambda ()
(pretty-print (syntax->datum x))))
@@ -294,7 +294,7 @@
(car (reverse x)))
(define (pf x)
- (define port (open-file "/home/stis/src/python-on-guile/compile.log" "a"))
+ (define port (open-file "/home/stis/src/python-on-guile/modules/compile.log" "a"))
(with-output-to-port port
(lambda () (pretty-print (syntax->datum x)) x))
(close port)
@@ -1389,10 +1389,13 @@
,@(map
(lambda (dots ids as)
`(,(G 'begin)
- ,@(map (lambda (dots ids as)
- (let* ((u (module-name (current-module)))
- (u (reverse (list-cdr-ref (reverse (u-it u))
- (- (length dots) 1))))
+ ,@(map (lambda (dots ids as)
+ (let* ((u (module-name (current-module)))
+ (u (if (null? dots)
+ '()
+ (reverse (list-cdr-ref
+ (reverse (u-it u))
+ (- (length dots) 1)))))
(path (append (if (null? dots) '() u)
(map (g vs exp) ids))))
@@ -2059,7 +2062,7 @@
(define (exp vs x)
- (match x
+ (match (pr 'exp x)
((e)
(exp vs e))
((tag . l)
@@ -2117,6 +2120,7 @@
(x '())))
(fluid-set! ignore '())
+ (pr
(if (fluid-ref (@@ (system base compile) %in-compile))
(begin
(if (fluid-ref (@@ (system base compile) %in-compile))
@@ -2162,7 +2166,7 @@
(if (member s (fluid-ref ignore))
`(,cvalues)
`(,(C 'var) ,s))) globs)
- (,(C 'with-exit) ,@e))))))
+ (,(C 'with-exit) ,@e)))))))