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

internal error: no box to accumulate definition-context scopes #2062

Closed
AlexKnauth opened this issue May 2, 2018 · 1 comment
Closed

internal error: no box to accumulate definition-context scopes #2062

AlexKnauth opened this issue May 2, 2018 · 1 comment

Comments

@AlexKnauth
Copy link
Member

AlexKnauth commented May 2, 2018

When I call syntax-local-make-definition-context within a module's begin-for-syntax, and then I require that module, I get an internal error from the macro expander.

Here's a minimal example of what gets the internal error:

#lang racket

(module A racket
  (begin-for-syntax
    (syntax-local-make-definition-context)))

(require 'A)
. internal error: no box to accumulate definition-context scopes

I'm on Racket version 6.90.0.28.

The error seems to be coming from "expand/definition-context.rkt" line 58, if that helps.

(unless def-ctx-scopes (error "internal error: no box to accumulate definition-context scopes"))

@lexi-lambda
Copy link
Member

lexi-lambda commented May 4, 2018

Wow, I just ran into a very similar issue and was about to report it when I saw you had already opened this issue. In my case, I was trying to use syntax-local-make-definition-context on the RHS of a let-syntaxes binding, which produces the same error:

#lang racket
(let-syntax ([x (syntax-local-make-definition-context)])
  (void))

I’m not sure if this is the same bug or a different one, but it seems plausible it’s related.

@mflatt mflatt closed this as completed in c927a00 May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants