query
On this page

makeExtensible

lib.fixedPoints.makeExtensible

Docs pulled from | This Revision | about 2 hours ago


Create an overridable, recursive attribute set. For example:

nix-repl> obj = makeExtensible (final: { })

nix-repl> obj
{ __unfix__ = «lambda»; extend = «lambda»; }

nix-repl> obj = obj.extend (final: prev: { foo = "foo"; })

nix-repl> obj
{ __unfix__ = «lambda»; extend = «lambda»; foo = "foo"; }

nix-repl> obj = obj.extend (final: prev: { foo = prev.foo + " + "; bar = "bar"; foobar = final.foo + final.bar; })

nix-repl> obj
{ __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; }

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

makeExtensible = makeExtensibleWithCustomName "extend";