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

typechecker: Evaluate bound expressions only once #1464

Closed
wants to merge 2 commits into from

Commits on Jul 3, 2023

  1. typechecker: Don't expand bindings in a match statement

    This was a way to achieve some level of pattern nesting, but it makes
    for cryptic matches and makes it more difficult to avoid evaluating the
    bound expression more than once, since its context doesn't easily allow
    for statement insertions.
    cg-jl committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    8c05fa2 View commit details
    Browse the repository at this point in the history
  2. typechecker: Evaluate bound expressions only once

    Now Jakt inserts declarations to save the bound expressions before
    checking them, and uses the variable names to access the bound parts.
    This ensures that the original expression isn't run more than once.
    cg-jl committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    992ba70 View commit details
    Browse the repository at this point in the history