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

Fix dhall-json for new Prelude.JSON.Type #1631

Merged
merged 5 commits into from
Jan 15, 2020
Merged

Conversation

Gabriella439
Copy link
Collaborator

... based on an issue caught by @NicolasT

dhall-lang/dhall-lang#873 changed
Prelude.JSON.Type which requires matching changes to dhall-json
to support encoding/decoding Dhall expressions of that type. We
still support the old type, too.

dhall-lang/dhall-lang#873 changed
`Prelude.JSON.Type` which requires matching changes to `dhall-json`
to support encoding/decoding Dhall expressions of that type.  We
still support the old type, too.
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.

Thanks! I had totally forgotten about adapting this code!

@@ -590,6 +590,77 @@ dhallFromJSON (Conversion {..}) expressionType =

return result

-- Arbitrary JSON ~> https://prelude.dhall-lang.org/JSON/Type (v13.0.0 <=)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I hadn't realized that json-to-dhall supports this at all!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dhall-json/tasty/data/fromArbitraryJSON_12.0.0.dhall Outdated Show resolved Hide resolved
dhall-json/tasty/data/fromArbitraryJSON_13.0.0.dhall Outdated Show resolved Hide resolved
@sjakobi
Copy link
Collaborator

sjakobi commented Jan 15, 2020

Regarding the Hydra failure, I suspect you need to enhance some extra-src-files.

... instead of relying on the `HashMap` order, which is essentially
arbitrary

... as noted by @sjakobi
The `.` in the names was messing with Cabal's glob support in
`Extra-Source-Files`
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.

Cheers! :)

@mergify mergify bot merged commit d0c73e6 into master Jan 15, 2020
@mergify mergify bot deleted the gabriel/fix_new_json_type branch January 15, 2020 17:43
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