include bug with debug pasted by dieggsy on Wed Jul 24 06:46:10 2019
;; #!/usr/bin/csi -s ;; (define (main #!optional args) ;; (include "include.scm") ;; (define that "hey") ;; (foo)) ;; (main) [canonicalized] (##core#callunit library) (##core#callunit eval) (##core#callunit expand) (##core#undefined) (##core#undefined) (##core#undefined) (set! main (##core#lambda rest1314 (let ((args15 (let ((tmp1619 rest1314)) (if (scheme#null? tmp1619) '#f (scheme#car tmp1619))))) (let ((foo20 (##core#undefined)) (that21 (##core#undefined))) (let ((t22 (set! foo20 (##core#lambda () (chicken.base#print that21))))) (let ((t23 (set! that21 '"hey"))) (foo20))))))) (main) ((chicken.base#implicit-exit-handler))
with second include pasted by dieggsy on Wed Jul 24 06:46:58 2019
;; #!/usr/bin/csi -s ;; (define (main #!optional args) ;; (include "include.scm") ;; (include "include2.scm") ;; (define that "hey") ;; (foo)) ;; (main) [canonicalized] (##core#callunit library) (##core#callunit eval) (##core#callunit expand) (##core#undefined) (##core#undefined) (##core#undefined) (set! main (##core#lambda rest1314 (let ((args15 (let ((tmp1619 rest1314)) (if (scheme#null? tmp1619) '#f (scheme#car tmp1619))))) (let ((foo20 (##core#undefined))) (let ((t23 (set! foo20 (##core#lambda () (chicken.base#print that))))) (let ((that21 (##core#undefined))) (let ((t22 (set! that21 '"hey"))) (foo20)))))))) (main) ((chicken.base#implicit-exit-handler))
more -debug 2 added by megane on Wed Jul 24 07:22:24 2019
(let () (define (bar x) (when (< 0 x) (print "bar " x) (foo (sub1 x)))) (include "include.scm") (foo 10)) ;; include.scm ;; (define (foo x) (when (< 0 x) (print "foo " x) (bar (sub1 x)))) ;; include first: ;; (let () ;; (let ((foo9 (##core#undefined)) (bar10 (##core#undefined))) ;; (let ((t15 (set! foo9 ;; (##core#lambda ;; (x11) ;; (if (scheme#< '0 x11) ;; (let ((t12 (chicken.base#print '"foo " x11))) ;; (bar10 (chicken.base#sub1 x11))) ;; (##core#undefined)))))) ;; (let ((t16 (set! bar10 ;; (##core#lambda ;; (x13) ;; (if (scheme#< '0 x13) ;; (let ((t14 (chicken.base#print '"bar " x13))) ;; (foo9 (chicken.base#sub1 x13))) ;; (##core#undefined)))))) ;; (foo9 '10))))) ;; define bar first: ;; (let () ;; (let ((bar9 (##core#undefined))) ;; (let ((t16 (set! bar9 ;; (##core#lambda ;; (x10) ;; (if (scheme#< '0 x10) ;; (let ((t11 (chicken.base#print '"bar " x10))) ;; (foo (chicken.base#sub1 x10))) ;; (##core#undefined)))))) ;; (let ((foo12 (##core#undefined))) ;; (let ((t15 (set! foo12 ;; (##core#lambda ;; (x13) ;; (if (scheme#< '0 x13) ;; (let ((t14 (chicken.base#print '"foo " x13))) ;; (bar9 (chicken.base#sub1 x13))) ;; (##core#undefined)))))) ;; (foo12 '10))))))