Skip to content

Host interop limitations for interpreters #81

@michaelballantyne

Description

@michaelballantyne

Right now, an interpreter can at most use Racket's eval to process racket-exprs that don't refer to DSL variables and only refer to module-level variables in the surrounding context.

To get host subexpression references to DSL variables working, we would need reference compilers to work to allow us to transform these references into environment lookups. However, attempting to expand a #%host-expression as part of runtime eval currently doesn't work, and I'm not sure whether it can work. This could be worked around by traversing and eagerly expanding host expressions, but we don't have a tool to help with that.

To get DSL references to host variables working, we'd need a way to identify the host variables referenced by DSL syntax at expansion time so that we could wrap the interpreter call with something that gathers values for these variables and maybe puts them in an environment. Right now get-racket-referenced-identifiers doesn't work with racket-var, so we can't find references in host expressions. And we can't use racket-var as the reference syntax in syntax-spec because it can't be used in reference position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions