[Nix-dev] Haskell NG
Peter Simons
simons at cryp.to
Thu Dec 18 15:03:09 CET 2014
Hi Russel,
>> 2) Haskell packages support 'deepOverride'.
>
> How would you feel about using my overrideScope functionality from my
> haskellPackagesFixpoint branch instead?
the first version of my re-factored Haskell code defined deep overrides exactly
the way you did it. Check out the "definePackage" function in [1]. You'll find
that I studied your work thoroughly.
My impressions are:
1. overrideScope and deepOverride achieve the same goal. I discovered no case
where one function worked but the other one didn't.
2. deepOverride is a standard function every callPackage derivation supports.
overrideScope, on the other hand, is not.
3. deepOverride is implemented in a simple generic algorithm (for appropriate
definitions of the term "simple") that requires no special support from the
haskellPackages record to function. overrideScope, on the other hand, needs
the magic nixClass attribute (__unfix__ in my code) to build a stack of
extension functions.
Ultimately, I felt that I should stick to the standard deepOverride mechanism
mostly due to Occam's razor'ish reasoning: I'd rather not introduce a new
sophisticated tying-the-knot mechanism to haskellPackages just to do the same
thing that deepOverride can do already.
Does that make sense?
Best regards,
Peter
[1] https://github.com/NixOS/cabal2nix/blob/070a5342a9dd5bbb6387f16750941881889c4cc8/doc/ng.nix
More information about the nix-dev
mailing list