Refactor 'RelaxDeps' to avoid semantic ambiguity of mempty value
commit4066ea7adc761349e14b669dc15ba4293fb13328
authorHerbert Valerio Riedel <hvr@gnu.org>
Sun, 6 Aug 2017 11:00:32 +0000 (6 13:00 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Wed, 9 Aug 2017 16:38:46 +0000 (9 18:38 +0200)
tree7ec7ce2227a362a1187dbb9420550eaf715ce1aa
parenta8036999a777505d4a68e499440ab50c1dedb582
Refactor 'RelaxDeps' to avoid semantic ambiguity of mempty value

This removes the redundancy between `RelaxDepsNone` and
`RelaxDepsSome []` by removing `RelaxDepsNone`.

This way we avoid the risk of subtle bugs that can occur if the same
semantic value can be expressed in a non-unique way.

A further step to normalise the type would be to turn `[RelaxedDep]`
into `Set RelaxedDep`, but there is no operation that would
significantly benefit from that yet.
cabal-install/Distribution/Client/Config.hs
cabal-install/Distribution/Client/Configure.hs
cabal-install/Distribution/Client/Dependency.hs
cabal-install/Distribution/Client/Install.hs
cabal-install/Distribution/Client/ProjectConfig.hs
cabal-install/Distribution/Client/ProjectConfig/Legacy.hs
cabal-install/Distribution/Client/Setup.hs
cabal-install/Distribution/Client/Types.hs
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs