lib: document fix and add fix', extends functions

These functions used to live in pkgs/development/haskell-modules/default.nix,
but they are generic, really, and should be easily accessible to everyone.
This commit is contained in:
Peter Simons
2015-11-24 12:48:03 +01:00
parent 8bdc73caab
commit 405fda497a
2 changed files with 42 additions and 4 deletions

View File

@@ -6,9 +6,9 @@
let
fix = f: let x = f x // { __unfix__ = f; }; in x;
fix = stdenv.lib.fix';
extend = rattrs: f: self: let super = rattrs self; in super // f self super;
extend = stdenv.lib.flip stdenv.lib.extends;
haskellPackages = self:
let