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

Double newline in yaml #56

Closed reactormonk closed 5 years ago

reactormonk commented 5 years ago
{ x = ''foo
bar
'' }

gives

$ dhall-to-yaml < bug.dhall 
x: ! 'foo

  bar

'
Gabriella439 commented 5 years ago

@reactormonk: See: https://github.com/snoyberg/yaml/issues/152

The summary of that issue is that the result is technically correct, but probably undesirable. However, that issue is now fixed and the default behavior in yaml-0.10.2.0 now does what you expect:

$ dhall-to-yaml <<< './bug.dhall' 
x: |
  foo
  bar

I just updated dhall-json to build against the latest version of yaml in https://github.com/dhall-lang/dhall-json/pull/57 so the next release will have the desired behavior.