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

Add dhall lint support for deprecating Optional/{fold,build} #1628

Merged
merged 3 commits into from
Jan 15, 2020

Conversation

Gabriella439
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@sjakobi sjakobi left a 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/folds though. How about also matching on a fully applied Optional/fold then, and rewriting that to a merge-expression?

@Gabriella439
Copy link
Collaborator Author

@sjakobi: I'll postpone this until after the 1.29 release, because addressing your feedback is tricky

@sjakobi
Copy link
Collaborator

sjakobi commented Jan 13, 2020

@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.

<|> removeLetInLet e
<|> replaceOptionalBuildFold e

higherPriorityRewrite = replaceSaturatedOptionalFold
Copy link
Collaborator

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!

Copy link
Collaborator Author

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

@mergify mergify bot merged commit f10ff98 into master Jan 15, 2020
@mergify mergify bot deleted the gabriel/lint_optional_fold_build branch January 15, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants