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

Fixing an off by one error in Expr variable evaluation. #435

Merged
merged 5 commits into from
Nov 7, 2022

Conversation

lepsa
Copy link
Contributor

@lepsa lepsa commented Nov 3, 2022

Fix for #431

Reversing the order of pattern names and values when evaluating Exprs, and changing how variable lookup is performed to ensure that if a variable is used it always has a value associated with it.

Adding tests to check that let bindings work as expected when nested and overloading names in scope.

lepsa added 3 commits November 3, 2022 19:55
Reversing the order of pattern names and values when evaluating Exprs,
and changing how variable lookup is performed to ensure that if a
variable is used it always has a value associated with it.

Adding tests to check that let bindings work as expected when nested and
overloading names in scope.
@@ -37,4 +37,6 @@ programExec =
it "calls a function with a named and an unnamed argument" $
"module a(b,c){echo(b+c);}a(b=1,1);" --> oneMessage TextOut (SourcePosition 1 15 []) "2.0"
-- it "warns about a missing argument" $
-- "module a(b){echo(b);}a();" --> oneMessage TextOut (SourcePosition 1 13 []) "1.0"
-- "module a(b){echo(b);}a();" --> oneMessage TextOut (SourcePosition 1 13 []) "1.0"=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did this equal sign get here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably errant typing in vim. Boo-urns.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@julialongtin julialongtin merged commit bcc5ea9 into Haskell-Things:master Nov 7, 2022
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

Successfully merging this pull request may close these issues.

2 participants