-
Notifications
You must be signed in to change notification settings - Fork 217
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
Fix dhall freeze
to better handle protected imports
#1772
Conversation
This includes two changes: * `dhall freeze` will now fix an ordinary protected import that does not yet have a fallback import * `dhall freeze` will now add a fallback import to an import that is already protected
@Gabriel439 Do the two changes from the PR description apply only with the |
@sjakobi: These changes only affect the |
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.
LGTM, although I'm not confident that I haven't missed anything. I believe we also don't have any tests. Maybe @SiriusStarr could give this a spin?
-- This case is necessary because `transformOf` is a bottom-up | ||
-- rewrite rule. Without this rule, if you were to transform a |
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.
Tangential: Are there any top-down rewrite rules that we could use instead? I believe we have to apply similar workarounds in other places.
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.
Are there any top-down rewrite rules that we could use instead?
I assume the types probably wouldn't work out…
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.
There aren't any that I know of.
... as caught by @sjakobi Co-authored-by: Simon Jakobi <[email protected]>
@sjakobi: I went ahead and added tests to confirm that this behaves as expected, so I'll go ahead and mege |
Thank you for adding tests, @Gabriel439! :) |
@sjakobi: You're welcome! 🙂 |
This includes two changes:
dhall freeze
will now fix an ordinary protected import that does notyet have a fallback import
dhall freeze
will now add a fallback import to an import that isalready protected