query
On this page

overrideExisting

lib.overrideExisting

Docs pulled from | This Revision | 31 minutes ago


Override only the attributes that are already present in the old set useful for deep-overriding.

Inputs

old

Original attribute set

new

Attribute set with attributes to override in old.

Type

overrideExisting :: AttrSet -> AttrSet -> AttrSet

Examples

lib.attrsets.overrideExisting usage example

overrideExisting {} { a = 1; }
=> {}
overrideExisting { b = 2; } { a = 1; }
=> { b = 2; }
overrideExisting { a = 3; b = 2; } { a = 1; }
=> { a = 1; b = 2; }
(lib.attrsets.overrideExisting)

Noogle also knows

Aliases