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

Support yaml separators #58

Closed f-f closed 5 years ago

f-f commented 5 years ago

Use-case: I have a List {...}, and I'd like to map over that list and output several yaml objects (to the same file with separators, or to different files, not really relevant). There is some ways to solve this issue, e.g.:

It would be nice if dhall-to-yaml had a flag (--separators?) such that if the top object is a List, every element would be converted to yaml, and there would be a separator in between.

Something like:

$ dhall-to-yaml --separators <<< "[1, 2, 3]"
1
---
2
---
3
f-f commented 5 years ago

Relevant issue in Data.Yaml

f-f commented 5 years ago

Turns out it's easier to implement than I though, so I'm putting together a PR for this