Den 2012-07-19 16:48:01 skrev Marc Weber <[email protected]>:

> Try checksumming
>
> rec {
>   a = b;
>   b = a;
> };

:)


> and you'll understand that it is not easy to do so (even less since the
> aterm library implementation was dropped).
>
> So think about what makes your attr sets distinct and use that for
> creating a unique name.
>
> So it may pay off providing more details.
>
> Adding a md5sum primop function to the nix language should be straight
> forward.

Yes, and that would probably be sufficient for me. Then I could checksum
some of the attributes to create an id.


> An alternative solution would be using natural numbers:
>
> let attrs = [a,b,c]
> then turn the list into the attr set with unique names - using the list
> index as name and the like (check that everything get restarted
> correctly)

I'm not sure I'm following you here.


Thanks!

   / Rickard
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to