-
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
Reject record projection when there is a field type mismatch #1027
Conversation
Fixes #1020 This also includes small fixes to the `MissingField` error message, which I found along the way.
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.
Good stuff!
Should this wait for #1023 and possibly even dhall-lang/dhall-lang#601 though!?
short = "Projection type mismatch" | ||
|
||
long = | ||
"Explanation: You can project a subset of fields from a record by specifying the \n\ |
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.
Great explanation! 👍
I was dreading to write one myself!
... as suggested by @sjakobi
... as caught by @sjakobi
Ah, I thought we'd need to pass put I'm wondering whether the code would actually be easier to understand if we didn't have 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! :)
@sjakobi: dhall-haskell/src/Dhall/TypeCheck.hs Lines 887 to 899 in 3c05125
|
... as suggested by @sjakobi in #1027 (comment) After some internal refactors, `prettyDiff` is now just an alias for `Dhall.Diff.diffNormalized`, so it's no longer necessary.
... as suggested by @sjakobi in #1027 (comment) After some internal refactors, `prettyDiff` is now just an alias for `Dhall.Diff.diffNormalized`, so it's no longer necessary.
Fixes #1020
This also includes small fixes to the
MissingField
error message,which I found along the way.