Skip to content

Add --json flag for dhall {decode,encode} #717

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

Merged
merged 3 commits into from
Nov 29, 2018
Merged

Conversation

Gabriella439
Copy link
Collaborator

Fixes #714

This adds a --json flag that dhall decode and dhall encode can use to
read/write the equivalent JSON representation of the CBOR. This comes in
handy for the parsing compliance tests which use this CBOR-as-JSON as the
standard representation of the abstract syntax tree.

Fixes #714

This adds a `--json` flag that `dhall decode` and `dhall encode` can use to
read/write the equivalent JSON representation of the CBOR.  This comes in
handy for the parsing compliance tests which use this CBOR-as-JSON as the
standard representation of the abstract syntax tree.
@Gabriella439
Copy link
Collaborator Author

@f-f: Ah, CI caught a problem with this. cborg-json requires a version of base newer than what GHC 7.10.3 supports (cc: @jneira)

@jneira
Copy link
Collaborator

jneira commented Nov 28, 2018

Mmm, cborg-json-0.2.10 uses base (>=4.7 && <4.13) and ghc-7.10.3, base = 4.8.2.0 so, in theory, they could be compatible...

@Gabriella439
Copy link
Collaborator Author

Gabriella439 commented Nov 28, 2018

Oh, I completely misunderstood what was going on. It's actually the exact opposite problem: ghc-8.6 uses a version of base that is too new for cborg-json. Let me see if I can get cborg-json to bump its upper bound on base

Edit: Looks like a newer version of cborg-json already did. Ignore this

@Gabriella439
Copy link
Collaborator Author

Looking more closely, cborg-json is not on Stackage so I need to see if the maintainers would be okay with adding it to Stackage

@Gabriella439
Copy link
Collaborator Author

Here is the request to add cborg-json to Stackage: well-typed/cborg#191

@Gabriella439
Copy link
Collaborator Author

Alright, cborg-json was added to Stackage nightly and I fixed dhall to use the latest version which has the expanded bounds on base so this is good to merge now

@Gabriella439 Gabriella439 merged commit a671e9c into master Nov 29, 2018
@Gabriella439 Gabriella439 deleted the gabriel/cbor_json branch November 29, 2018 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants