Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported macros confuse bindings. #5

Open
GoogleCodeExporter opened this issue Apr 23, 2015 · 4 comments
Open

Imported macros confuse bindings. #5

GoogleCodeExporter opened this issue Apr 23, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

check later

Original issue reported on code.google.com by aohelin on 2 Apr 2010 at 2:44

@GoogleCodeExporter
Copy link
Author

Yes, this is a bug as witnessed in:

"(define-module foo
   (export bar)
   (define baz 42)
   (define-syntax bar
      (syntax-rules ()
         ((bar . stuff) baz))))

(import foo)

(baz 101)" -> what's a 'baz'?

The dependencies of macros should be stored in their own environments, just 
like in closures, 
instead of relying on bindings in some later state of the toplevel.

Original comment by aohelin on 15 Apr 2010 at 8:09

  • Changed state: Accepted
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Should just inline the values to the macro rewrite rules. Surprisingly this has 
not affected any programs, and the macro expander will probably be rewritten 
anyway a bit later, so will pushing this for some later time.

Original comment by aohelin on 22 Sep 2010 at 1:45

  • Added labels: Milestone-0.3

@GoogleCodeExporter
Copy link
Author

this is also a feature, since the macros work this way in r5rs scheme. should 
still consider to break this and make the behavior more owlish by having the 
macros remember their environment, and probably override, or at least fill, any 
necessary bindings from there.

Original comment by aohelin on 7 Apr 2011 at 7:11

@GoogleCodeExporter
Copy link
Author

Original comment by aohelin on 9 May 2012 at 12:36

  • Changed title: Imported macros confuse bindings.
  • Added labels: Type-R5RS
  • Removed labels: Milestone-0.3, Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant