[Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

Sergiu Ivanov sivanov at colimite.fr
Mon May 29 17:12:03 CEST 2017


Hello Domen,

Thus quoth  Domen Kožar  at 12:16 on Mon, May 29 2017:
>
> Note that this will fail if you'll nest the attributes, one will override
> the other.
>
> nix-repl> :p concatAttrs [ {x={a =3;};} {x={ b= 4;};} ]
> { x = { b = 4; }; }

Sure, that seems to follow naturally from the semantics of //.

Now, indeed, I didn't at all take into account the potential complexity
of the attribute sets and just focused on my simple use case.  Thanks
for pointing me to other situations.

--
Sergiu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170529/173c6e99/attachment.sig>


More information about the nix-dev mailing list