Dhall-haskell: dhall-to-yaml dhall-to-yaml-ng inconsistent parser

Created on 7 Feb 2020  Â·  9Comments  Â·  Source: dhall-lang/dhall-haskell

$ 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
jsoyaml

Most helpful comment

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

All 9 comments

$ 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.

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.

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. https://github.com/dhall-lang/dhall-haskell/issues/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.

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!

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.

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

sweet looks exactly what is just prepared :)

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

@fkowal: You're welcome! 🙂

Was this page helpful?
0 / 5 - 0 ratings