[Nix-dev] [PATCH] t/allow-arbitrary-strinsg-in-names
Michael Raskin
7c6f434c at mail.ru
Tue Jul 13 06:37:40 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/13/2010 02:58 AM, Marc Weber wrote:
> allow strings as names in attribute sets:
>
> Example:
>
> let sourcesByVersion = {
> "git-1.8" : fetchurl ..
> "git-2.0" : fetchurl ..
> }
>
> This isn't something new. This undocumented feature was available for a long
> time using listToAttrs which accepted arbitrary strings as name.
Your example is misleading. Having read the patch, I think that it is
useful for this use case; and I wanted to object to the ":" syntax, but
then I saw that a matching example would be
{
"git-1.8" = fetchurl {..};
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJMO+2UAAoJEE6tnN0aWvw3P5gH/iYMFU/L87FaA722KO0ZvJCf
5eqWBAsmZpKZZhnwT129rAQLcY5RvKstz9mfrgplx50jiC7cfAykqnCXoxUthxyy
JnYiBo/NgYg0GEJpIHqEc5a/+J4R2eRxGE8djrGC4oIDMjT/n0HAPbcIXgdkf5JN
w/b0/7rhNVH8EPKdfHhd24WFCKkceiQ5pITE0twlcn7rPXBdsiW8iiQt3Szd+nvi
nvkp/N/hLpLvBf5nF+h+Jc4K+A8x2AQU/l2RTCJZEHquMHAaVlkYVvbBCUHtUl/d
EBAoMunqo0j7tJTZNPAB/prKaf8X3dClWAUCIM5TTUeTq94iIKKh8ACrOzHJyZ4=
=z8/F
-----END PGP SIGNATURE-----
More information about the nix-dev
mailing list