dhall-nix-lib/Function/extends.dhall

13 lines
387 B
Text

λ(nix : ../NixPrelude.dhall) →
let Set = ../Set/Type.dhall
let Set/mergeAttrs = ../Set/mergeAttrs.dhall nix
let extends
: (Set → Set → Set) → (Set → Set) → Set → Set
= λ(f : Set → Set → Set) →
λ(rattrs : Set → Set) →
λ(self : Set) →
let super = rattrs self in Set/mergeAttrs super (f super self)
in extends