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

dhall-to-yaml dhall-to-yaml-ng inconsistent parser #1662

Closed
fkowal opened this issue Feb 7, 2020 · 9 comments
Closed

dhall-to-yaml dhall-to-yaml-ng inconsistent parser #1662

fkowal opened this issue Feb 7, 2020 · 9 comments

Comments

@fkowal
Copy link

fkowal commented Feb 7, 2020

$ dhall-to-yaml-ng <<<'{uri.prefix = "test"}'
uri:
  prefix: test
$ dhall-to-yaml <<<'{uri.prefix = "test"}'


Error: Invalid input

(stdin):1:5:
  |
1 | {uri.prefix = "test"}
  |     ^
unexpected '.'
expecting :, =, or whitespace
@sjakobi
Copy link
Collaborator

sjakobi commented Feb 7, 2020

$ dhall-to-yaml-ng <<<'{uri.prefix = "test"}'
uri:
  prefix: test

The dotted-field syntax you're using here has just been merged. So I suspect you're using an unreleased version of dhall-to-yaml-ng, while your version of dhall-to-yaml is older.

@fkowal
Copy link
Author

fkowal commented Feb 7, 2020

Wow that's the fastest fix ever :)

I compiled the latest dhall-json and it's as working.
The issue was spotted in dhall-to-yaml 1.6.1 on mac. Comming from brew search dhall-json

So thank you for the great job you're doing!

Do you know what what is the reason for being dhall-to-yaml and dhall-to-yaml-ng?

dhall-yaml module provides an additional yaml-to-dhall but this is not a part of dhall-json.

And since the dhall-yaml is not a published artifact I am going to have a challenge to get people to install/compile yaml-to-dhall manually.

@sjakobi
Copy link
Collaborator

sjakobi commented Feb 7, 2020

And since the dhall-yaml is not a published artifact I am going to have a challenge to get people to install/compile yaml-to-dhall manually.

Hm, dhall-yaml should be published just like dhall-json. What's missing?

Do you know what what is the reason for being dhall-to-yaml and dhall-to-yaml-ng?

dhall-yaml module provides an additional yaml-to-dhall but this is not a part of dhall-json.

dhall-to-yaml-ng uses the new HsYAML library and can in the future support YAML features that require direct translation from Dhall to YAML, e.g. #1379.

dhall-to-yaml exists

  1. as a convenience for users who are used to find the dhall-to-yaml executable in the dhall-json package,
  2. for users who can't use the GPL-licenced HsYAML toolchain in dhall-yaml.

@fkowal
Copy link
Author

fkowal commented Feb 7, 2020

Ah now I see. Indeed dhall-yaml can be found in https://github.com/dhall-lang/dhall-haskell/releases

I falsely assumed it wasn't published because i didn't find a brew formula for it. https://formulae.brew.sh/formula/dhall-yaml

Thank's again for your great work!

@fkowal fkowal closed this as completed Feb 7, 2020
@sjakobi
Copy link
Collaborator

sjakobi commented Feb 7, 2020

You're welcome, @fkowal!

I falsely assumed it wasn't published because i didn't find a brew formula for it.

Ah, yes. I hadn't noticed that because I use Linux.

I'm sure a lot of people would appreciate a formula for dhall-yaml – would you possibly be interested in making one? I'd assume that most of it could be copied from the one for dhall-json.

@Gabriella439
Copy link
Collaborator

I already have a pull request up to add dhall-yaml to brew here: Homebrew/homebrew-core#49894

@fkowal
Copy link
Author

fkowal commented Feb 7, 2020

sweet looks exactly what is just prepared :)

@fkowal
Copy link
Author

fkowal commented Feb 7, 2020

Again thank you guys for the great job you're doing!

@Gabriella439
Copy link
Collaborator

@fkowal: You're welcome! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants