query
On this page

setFunctionArgs

lib.setFunctionArgs

Docs pulled from | This Revision | about 12 hours ago


Add metadata about expected function arguments to a function. The metadata should match the format given by builtins.functionArgs, i.e. a set from expected argument to a bool representing whether that argument has a default or not. setFunctionArgs : (a → b) → Map String Bool → (a → b)

This function is necessary because you can't dynamically create a function of the { a, b ? foo, ... }: format, but some facilities like callPackage expect to be able to query expected arguments.

Inputs

f

1. Function argument

args

2. Function argument

(lib.trivial.setFunctionArgs)

Noogle also knows

Aliases