about summary refs log tree commit diff
path: root/users/flokli
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-04-12T17·30+0200
committersterni <sternenseemann@systemli.org>2021-04-12T17·47+0000
commitf59ab9aba506c1ed149f7093f5543ef021567ebc (patch)
treed57ea2ee31ef65e550892ded6ffc2894dcafd6c9 /users/flokli
parente09b44bdec0167a6e1fec23e5ca294033814dbeb (diff)
feat(sterni/nix/fun): add hasEllipsis r/2495
As a complementation to builtins.functionArgs this function checks if
the function has a set pattern that contains an ellipsis
(i. e. `{ [arg, [ arg1, [ … ]]] ... }:`). The implementation of this is
pretty cursed however since there is no clean way to do this in vanilla
nix: We need to match on the output of builtins.toXML which does try to
serialize functions by outputting their argument and information about
it (whether it is a normal argument or a attribute set pattern, in the
latter case it also serialize every component of the pattern).

Change-Id: I0f33721811a3180cec205a0c98e6d92e10e92075
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2950
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/flokli')
0 files changed, 0 insertions, 0 deletions