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

Add command line option to render many documents #59

Closed f-f closed 5 years ago

f-f commented 5 years ago

Fix #58

Adds a --manyDocs command line option to render a Dhall list as a list of YAML documents in the same stream. (suggestions welcome on a better name for the option)

I opened a patch to upstream (yaml) to have access to the YAML stream events (to add DocumentStart and DocumentEnd where needed), but just concatenating strings in this way is 10x less code and it's much easier to understand/maintain (IMO)

jneira commented 5 years ago

what about --split (or --list-split)? It is simpler and maybe more ambiguous, although i dont think in any overloaded meaning right now

Gabriella439 commented 5 years ago

I would suggest --documents, mainly because (A) I try to avoid abbreviating words in user-facing options and (B) "many" is redundant since "docs"/"documents" is plural

f-f commented 5 years ago

Lovely, I'll go with --documents 👍

Gabriella439 commented 5 years ago

@f-f: Looks great! Thanks for doing this 🙂