-
Notifications
You must be signed in to change notification settings - Fork 58
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
LEM match values #1190
LEM match values #1190
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good! I just left one comment about a change that needs to be done
src/lem/interpreter.rs
Outdated
let ptr = bindings.get_ptr(match_var)?; | ||
if ptr.tag() != &Tag::Expr(Sym) { | ||
if ptr.tag() != &tag { | ||
bail!("{match_var} is not a symbol"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message needs to be updated
Here's an idea that can be done later:
The rule of thumb is that we should do our best to avoid having inconsistent |
c833d1f
to
2e749d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR introduces the more general match of values, instead of only symbols