Open
Description
Running:
yaml-to-dhall '< Foo : Natural | Bar : Natural >' <<< 'Foo: 20'
Results in:
Error: $: Dhall type expression and YAML value do not match:
Expected Dhall type:
< Bar : Natural | Foo : Natural >
YAML:
Foo: 20
while running:
yaml-to-dhall '< Foo : Natural | Bar : Natural >' <<< '20'
Results in:
< Bar : Natural | Foo : Natural >.Bar 20
I understand that I can use --unions-strict
to turn the second case into an error, but is there a way that I can get yaml-to-dhall
to reliably return < Bar : Natural | Foo : Natural >.Foo 20
?
Discovered while trying to parse into this type: https://github.com/coralogix/dhall-utility-library/blob/8ad768e4a7ab313b5ee1b01c093ffdd1fef379c7/kubernetes/Space.dhall