-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add dhall lint
support for deprecating Optional/{fold,build}
#1628
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.
Awesome! :)
I suspect that these refactorings won't produce the desired results at least in the case of applied Optional/fold
s though. How about also matching on a fully applied Optional/fold
then, and rewriting that to a merge
-expression?
@sjakobi: I'll postpone this until after the 1.29 release, because addressing your feedback is tricky |
Feel free to merge as-is then. We can still add the other refactoring at a later stage. |
... as suggested by @sjakobi
<|> removeLetInLet e | ||
<|> replaceOptionalBuildFold e | ||
|
||
higherPriorityRewrite = replaceSaturatedOptionalFold |
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.
Ah, now I understand why my request was tricky to implement! :) Cheers!
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.
Yeah, the rewrite is depth-first, so the Optional/fold
gets replaced before the rewrite has a chance to match on the larger saturated Optional/fold
expression
No description provided.