Make iform->sexpr ignore identifiers #90

Closed
wants to merge 3 commits into
from

Projects

None yet

1 participant

@ghost
ghost commented Sep 8, 2015

Before

gosh> (macroexpand-all '(cut print <>))
(lambda (|#<identifier srfi-26#x.e82d20>.0|) (print |#<identifier srfi-26#x.e82d20>.0|))
gosh> (macroexpand-all '((cut print <>) 1))
(letrec ((|#<identifier srfi-26#x.e821c0>.0| '1)) (print |#<identifier srfi-26#x.e821c0>.0|))

After

gosh> (macroexpand-all '(cut print <>))
(lambda (x) (print x))
gosh> (macroexpand-all '((cut print <>) 1))
(letrec ((x '1)) (print x))
@shirok
Owner
shirok commented Sep 8, 2015

The ".0" part is crucial and shouldn't be dropped, for it needs to distinguish same local name with different bindings. So I'd like to have it as

(lambda (x.0) (print x.0))

etc.

@ghost
ghost commented Sep 9, 2015

I misunderstood. How do you think about the next change?

@ghost
ghost commented Sep 9, 2015
gosh> (macroexpand-all '(cut print <>))
(lambda (x.0) (print x.0))
gosh> (macroexpand-all '((cut print <>) 1))
(letrec ((x.0 '1)) (print x.0))
@shirok
Owner
shirok commented Sep 9, 2015

Looks ok. Let me test it locally before merge. Thanks!

@shirok
Owner
shirok commented Sep 10, 2015

Works great. Merged. Thanks!

@shirok shirok closed this Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment