Hello, I am trying to figure out if dhall can limit/restrict/validate values
Let me illustrate with and example
Having a file test.yaml
someflag: true
yaml-to-dhall 'let OnlyTrue = < true > in { someflag : OnlyTrue }' --file ./test.yaml
Error: Dhall type expression and YAML value do not match:
Expected Dhall type:
< true >
YAML:
true
I would expect the above to succeed.
And it to fail for someflag: false
I believe it’s called literal types
https://www.typescriptlang.org/v2/docs/handbook/literal-types.html#string-literal-types
I am sort of looking for the oposite to https://prelude.dhall-lang.org/v11.1.0/JSON/package.dhall
where i would define a
a let OnlyTrue/fromJson = ...