This is what I want to do:
export QUX=foo
let FooBarBaz : Type = < foo | bar | baz >
in env:QUX as FooBarBaz : Type
Currently I’m doing like:
export QUX="($(find-this-files-absolute-path-in-bash)/FooBarBaz.dhall).Type.foo"
This is fine, but people agree that it’s kind of ugly and really ties that env var to Dhall rather than looking rather agnostic.
Is there way to do this as what I wanted? Perhaps it could be done with merge
but a) it’s midnight and b) it seems really ugly and not dry merge { foo = FooBar.Baz.Type.foo, ... }
. When I see json-to-dhall
being able to figure out this string-to-union situation, surely there’s solution.
Goodnight and thanks