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

Sergiu Ivanov sivanov at colimite.fr
Tue May 30 16:13:48 CEST 2017


Hello Daniel,

Thus quoth  Daniel Peebles  at 13:58 on Tue, May 30 2017:
>
> My favorite interface for this type of operation is from Haskell's
> Data.Map, in pseudo-Haskell notation:
>
> unionWithKey : (String -> a -> a -> a) -> Attrs a -> Atrs a -> Attrs a

Right, that's exactly the kind of function I was looking for :-)

Now, I think that in Nix the main problem is that attribute sets are
very often nested and that generic functions should be capable of
handling this nesting.  On the other hand, you usually don't care about
nesting when using Data.Map.

--
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/20170530/d4d5d6d5/attachment.sig>


More information about the nix-dev mailing list