-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Change ?
to only fall back on absent imports
#1181
Conversation
Fixes #1113 This changes the behavior of the `?` operator to only fall back to the second import if it cannot be retrieved (either from the cache or the specified location). In particular, it will not recover from type errors, parse errors, cyclic imports, or hash mismatches.
Matching change to the Haskell implementation: dhall-lang/dhall-haskell#2203 |
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.
Thank you, the previous behavior was a bit unexpected and difficult to work with when working on e₀
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.
This is a really good improvement! :)
… as suggested by @TristanCacqueray
… as suggested by @sjakobi Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com>
…g/dhall-lang into gabriel/don't_always_fall_back
… as suggested by @sjakobi Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com>
…g/dhall-lang into gabriel/don't_always_fall_back
In particular, clarify what happens if `e₀` successfully resolves
Fixes #1113
This changes the behavior of the
?
operator to only fall back tothe second import if it cannot be retrieved (either from the
cache or the specified location). In particular, it will not
recover from type errors, parse errors, cyclic imports, or hash
mismatches.