Re: [Nix-dev] Debugging a haskellPackages deep override gone wrong

2016-02-21 Thread Benno Fünfstück
Oh, I incorrectly assumed that the failure has anything to do with your overriding. But if you do $ nix-build -E "with (import {}); with haskell.lib; dontCheck (haskell.packages.ghc801.comonad)" that does fail in the same way, so in fact the overriding is not related at all to the issue your

Re: [Nix-dev] Debugging a haskellPackages deep override gone wrong

2016-02-21 Thread Gleb Peregud
I have no knowledge of Nix internals. I wonder if it is possible to add a debug / tracing commands which will track source of the literal value or tuple? Even more awesome would be to have a data lineage for a tuple, which would contain original tuple location and all spots where this tuple was

Re: [Nix-dev] Debugging a haskellPackages deep override gone wrong

2016-02-21 Thread Benno Fünfstück
Oops, small to the code example: the line should be `let parent = (oldArgs.overrides or (_: _: {})) new old` (new instead of parent in the second to last word) Benno Fünfstück schrieb am So., 21. Feb. 2016 um 16:59 Uhr: > Hi Kosyrev, > > The problem here is most

Re: [Nix-dev] Debugging a haskellPackages deep override gone wrong

2016-02-21 Thread Benno Fünfstück
Hi Kosyrev, The problem here is most likely that ghcOrig is already passed an overrides argument, so you need to preserve the changes done by that: ghc = ghcOrig.override (oldArgs: { overrides = with haskell.lib; new: old: let parent = (oldArgs.overrides or (_: _: {})) parent old;