-
Notifications
You must be signed in to change notification settings - Fork 10
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
Pretty printing for named closures #121
base: trunk
Are you sure you want to change the base?
Conversation
nit: can you make the commit title have a verb and active voice |
scrapscript.py
Outdated
# If creating a Closure with an Assign we can specify a name for the | ||
# Closure, which may be useful for debugging. | ||
print("Setting closure with name ", exp.name.name) | ||
value = Closure(value.env, value.func, name=exp.name.name) |
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.
If you do
a = x -> x
b = a
what happens?
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.
An alternative would be catching this in the parser where we see a pattern of Assign(x, Function())
or Assign(x, MatchFunction())
and plumb it through Function
too
a) maybe switch to the parser approach and |
looking good though! |
0d7863b
to
e957ff7
Compare
No description provided.