cabal-to-dhall has recently learned the default values of
fields. Now dhall-to-cabal is able to output the default values for
each type.
It's error-prone to keep two sources of defaults; they'll inevitably
drift and disagree. The solution here is to derive one from the other,
and going from a Haskell description of the defaults to Dhall files is
quite possible. dhall-to-cabal-meta is a new binary that can
generate the dhall/defaults/*.dhall files.
I've chosen to leave the generated files in the repo because it makes bootstrapping and development a little simpler, but they could easily be deleted.
cabal-to-dhall
has recently learned the default values of fields. Nowdhall-to-cabal
is able to output the default values for each type.It's error-prone to keep two sources of defaults; they'll inevitably drift and disagree. The solution here is to derive one from the other, and going from a Haskell description of the defaults to Dhall files is quite possible.
dhall-to-cabal-meta
is a new binary that can generate thedhall/defaults/*.dhall
files.I've chosen to leave the generated files in the repo because it makes bootstrapping and development a little simpler, but they could easily be deleted.