Closed quasicomputational closed 6 years ago
This approach does work, but I wonder if this would be simpler working purely on Dhall Expr
s. I can imagine simply turning mempty
into an Expr
, and the users given Package
/Executable
and essentially taking the asymmetric difference of users - default
and then taking the merge with default /\ user
, and finally performing a CSE-like procedure that we do in --print-type
to turn default
into something that just references the prelude
. I'm just worried there is quite a lot of duplication going on with this approach.
Duplication between dhall/defaults/*.dhall
and Haskell, you mean? My thinking here is that, with the default values embedded in Haskell, we can generate dhall/defaults/
programmatically and leave the code as the single source of truth.
Hitting it with CSE worries me a bit because we don't have fine control over what will happen; I'd rather be explicit about what and where is going to be defaulted.
Can you fix the conflicts in this?
Rebased & fixed up!
This implements using defaults to omit boring fields for Package, Executable, Library, Benchmark, TestSuite and CompilerOptions, leading to quite prodigious drops in line-count in the tests and consequent increases in readability.
Closes #57.