Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Support yaml separators #58

Closed
f-f opened this issue Sep 24, 2018 · 2 comments
Closed

Support yaml separators #58

f-f opened this issue Sep 24, 2018 · 2 comments

Comments

@f-f
Copy link
Member

f-f commented Sep 24, 2018

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

  • output the values to bash var separated by newlines, run a for loop to run dhall-to-yaml either piping to the same file after piping there a separator, or to different files
  • write a haskell program that reads the list, converts each value to yaml, and outputs to file(s)

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
Copy link
Member Author

f-f commented Sep 24, 2018

@f-f
Copy link
Member Author

f-f commented Sep 24, 2018

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

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

No branches or pull requests

1 participant