dhall-lang / dhall-json

This repository has moved to https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-json
BSD 3-Clause "New" or "Revised" License
65 stars 6 forks source link

Labels of records should be quoted in YAML #41

Closed markus1189 closed 6 years ago

markus1189 commented 6 years ago

When translating a record to YAML, the labels should always be quoted.

Otherwise you can run into bugs like this:

$ echo '{ true = "this is true"} ' | dhall-to-yaml
true: this is true

which is wrong because true is now an actual boolean. Intead it should quote the label:

"true": this is true
Gabriella439 commented 6 years ago

I think you should open an issue against the upstream yaml library: https://github.com/snoyberg/yaml/issues

That's the library that dhall uses and as far as I can tell it does not provide an option to emit quoted labels when rendering to YAML

markus1189 commented 6 years ago

Closed in favor if https://github.com/snoyberg/yaml/issues/137