Closed PierreR closed 7 years ago
It depends on what you mean by YAML file validation. If you mean that you could write the configuration file in Dhall, validate that using a type, and then convert to YAML then you can already do that today.
However, this library doesn't (and probably won't) support converting from YAML to Dhall. The Dhall language and ecosystem tries to avoid importing from other formats and encouraging people to author inputs directly in Dhall so that the whole pipeline is strongly typed from end-to-end.
I meant the second option not as a complete converter but more as a way to verify expectation while receiving such yaml files.
As you said I realized it is best to use the Dhall format up front. My sole reluctance doing so has been how foreign it might look to other people.
After https://github.com/Gabriel439/Haskell-Dhall-Library/issues/18 I felt more confident it isn't going to surprise readers that much.
It seems to me I could use the library to do yaml file validation.
Is it something that might be added in the future ?