yants: suboptimal error message if function signature has more arguments than given function

#93
Opened by sterni at 2021-01-31T13·04+00

Not sure if this can be fixed at all, feel free to close if not. It is at least somewhat alright as it is just the normal nix error message for when you call something with too many arguments.

nix-repl> test = with nix.yants; defun [ string bool string ] (a: a + " true")
nix-repl> test "foo" true
error: while evaluating anonymous function at /home/lukas/src/depot/nix/yants/default.nix:294:26, called from (string):1:1:
while evaluating '__functor' at /home/lukas/src/depot/nix/yants/default.nix:64:23, called from /home/lukas/src/depot/nix/yants/default.nix:294:30:
while evaluating 'checkToBool' at /home/lukas/src/depot/nix/yants/default.nix:80:19, called from /home/lukas/src/depot/nix/yants/default.nix:66:11:
attempt to call something which is not a function but a string, at /home/lukas/src/depot/nix/yants/default.nix:294:49