31 lines
916 B
Text
31 lines
916 B
Text
λ(nix : ../NixPrelude.dhall) →
|
|
let Any = ../Any/Type.dhall
|
|
|
|
let Map =
|
|
https://prelude.dhall-lang.org/Map/Type.dhall
|
|
sha256:210c7a9eba71efbb0f7a66b3dcf8b9d3976ffc2bc0e907aadfb6aa29c333e8ed
|
|
|
|
let Set = ../Set/Type.dhall
|
|
|
|
let Any/toAny = ../Any/toAny.dhall nix
|
|
|
|
let Any/toTypeUnchecked = ../Any/toTypeUnchecked.dhall nix
|
|
|
|
let Set/toSet = ../Set/toSet.dhall nix
|
|
|
|
let setFunctionArgs
|
|
: ∀(A : Type) → ∀(B : Type) → (A → B) → Map Text Bool → A → B
|
|
= λ(A : Type) →
|
|
λ(B : Type) →
|
|
λ(f : A → B) →
|
|
λ(args : Map Text Bool) →
|
|
Any/toTypeUnchecked
|
|
(A → B)
|
|
( Any/toAny
|
|
{ __functor : Any → A → B, __functionArgs : Set }
|
|
{ __functor = λ(_ : Any) → f
|
|
, __functionArgs = Set/toSet Bool args
|
|
}
|
|
)
|
|
|
|
in setFunctionArgs
|