This is intentional: @-capture captures what was actually passed. You
can always do something like: let args_ = args // { buildDepends =
args.buildDepends or buildDepends; } if you really need this behavior.
On 2016-02-12 06:11, Sergey Mironov wrote:
> Hi. I have an issue regarding the combinati
On 12/02/2016 12:11, Sergey Mironov wrote:
> Hi. I have an issue regarding the combination of two Nix features:
> default parameters ( f = {arg ? def } : ...) and arbitrary length
> parameters (f = args@{arg, ...} : ...). It looks like they doesn't
> work together silently. Here is the example from
Thanks, It is clear. I would also vote for shorter code here.
Sergey
2016-02-12 14:21 GMT+03:00 Vladimír Čunát :
> Hi.
>
> On 02/12/2016 12:11 PM, Sergey Mironov wrote:
>> I have an issue regarding the combination of two Nix features:
>> default parameters ( f = {arg ? def } : ...) and arbitrary
Hi.
On 02/12/2016 12:11 PM, Sergey Mironov wrote:
> I have an issue regarding the combination of two Nix features:
> default parameters ( f = {arg ? def } : ...) and arbitrary length
> parameters (f = args@{arg, ...} : ...).
@-pattern binds exactly what was *passed* to the function. Eelco
conside
Hi. I have an issue regarding the combination of two Nix features:
default parameters ( f = {arg ? def } : ...) and arbitrary length
parameters (f = args@{arg, ...} : ...). It looks like they doesn't
work together silently. Here is the example from my code. I'd like the
function make-nk-parser to t