Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 203cd959ce86
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: f305b9b0862f
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 20, 2018

  1. lib: Use lib.fixed-points.extends to avoid repetition

    Another attempt after my sloppy 48ccdf3.
    
    @infinisil, thanks again, reverted in 4794aa5 and explained my mistakes in 48ccdf3#commitcomment-29678643. I start with their work and provide this proof of this commit's correctness:
    ```nix
    (lib.fixedPoints.extends (lib.flip g) f) # now
    ((f: rattrs: self: let super = rattrs self; in super // f self super) (lib.flip g) f) # inline extends
    (self: let super = f self; in super // (lib.flip g) self super) # beta reduce
    (self: let super = f self; in super // g super self)  # beta reduce
    (self_: let super = f self_; in super // g super self_)  # alpha rename
    (self_: let super = f self_; in super // g super self_) # original, same
    ```
    
    Eventually we might harmonize `overrideScope`'s `g` parameter with the general pattern, but I leave that breaking change as a separate step. Best not to refactor and break at once, and at least the abstractions make the oddity clearer.
    John Ericson committed Aug 20, 2018
    Configuration menu
    Copy the full SHA
    3cf4354 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #45394 from NixOS/makeScope-dry

    lib: Use lib.fixed-points.extends to avoid repetition
    John Ericson committed Aug 20, 2018
    Configuration menu
    Copy the full SHA
    f305b9b View commit details
    Browse the repository at this point in the history