-
Notifications
You must be signed in to change notification settings - Fork 11
Implicit function cleanups #453
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
Implicit function cleanups #453
Conversation
9238656 to
3af7480
Compare
Kmeakin
left a comment
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.
Why replace turn surface::Param into an enum? What if we want to add other annotations to parameters, such as erasure?
| ) -> Vec<(ByteRange, Plicity, Option<StringId>, core::Term<'arena>)> { | ||
| self.local_env.reserve(params.len()); | ||
|
|
||
| Vec::from_iter(params.iter().map(|param| { |
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.
Why Vec::from_iter over the more familiar .collect()?
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.
It formats nicer hah.
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.
🤷 personal preference. I don't mind either way
| /// Arrow types. | ||
| Arrow( | ||
| Range, | ||
| Plicity, |
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.
Why remove implicit arrow types?
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.
Eventually I was hoping that we could make implicit arguments named. I’m also not sure how useful implicit arrows are? Seeing as you can’t infer them based on other arguments or the return type?
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.
Hmm, true. Since the most common use case for implicit parameters are type parameters, unnamed type parameters wouldn't be very useful.
cde0280 to
2185785
Compare
2185785 to
ff2cfa4
Compare
I guess I still had in my head the |
ff2cfa4 to
941aa50
Compare
Some cleanups to the implementation of implicit functions that were added in #439. I’ve broken the dependency on
core::Plicityin the surface syntax, adjusted some names, and cleaned up the insertion of implicit arguments somewhat (inspired by elaboration-zoo’s implementation).