-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Tolerate missing lists and maps in yaml-to-dhall and json-to-dhall #1410
Comments
What would be a good name for this option? |
One minor suggestion: see if there is an option name we can use for both directions for consistency (e.g. |
I am not super fussed about it, but I found out that 'omissible' is probably more accepted word than 'omittable'. About consistency though, |
From dhall-lang/dhall-kubernetes#83
When I try to run
yaml-to-dhall {x : Text, y : List Text}
on this yaml:It of course complains that
y
is missing. Correct type for this would be{x : Text, y : Optional (List Text)}
, but this can become too noisy even if a few a lists are optional. This is true especially in proejcts like dhall-kubernetes where (almost?) all the lists are optional. The same applies to maps.It would be nice to if
yaml-to-dhall
had a flag to tolerate missing lists and maps and assume empty values. It would also be the opposite of--omitEmpty
ofdhall-to-yaml
and would allow such YAML files to re-interpreted as Dhall.The text was updated successfully, but these errors were encountered: