about summary refs log tree commit diff
path: root/tests/lang/eval-okay-xml.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-01-06 Adapt tests to show that floats work properly.Christian Theune1-0/+2
2008-08-14 * Added an experimental feature suggested by Andres: ellipses ("...")Eelco Dolstra1-0/+2
in attribute set pattern matches. This allows defining a function that takes *at least* the listed attributes, while ignoring additional attributes. For instance, {stdenv, fetchurl, fuse, ...}: stdenv.mkDerivation { ... }; defines a function that requires an attribute set that contains the specified attributes but ignores others. The main advantage is that we can then write in all-packages.nix aefs = import ../bla/aefs pkgs; instead of aefs = import ../bla/aefs { inherit stdenv fetchurl fuse; }; This saves a lot of typing (not to mention not having to update all-packages.nix with purely mechanical changes). It saves as much typing as the "args: with args;" style, but has the advantage that the function arguments are properly declared (not implicit in what the body of the "with" uses).
2008-08-14 * @-patterns as in Haskell. For instance, in a function definitionEelco Dolstra1-0/+2
f = args @ {x, y, z}: ...; `args' refers to the argument as a whole, which is further pattern-matched against the attribute set pattern {x, y, z}.
2008-08-14 * Refactoring: combine functions that take an attribute set andEelco Dolstra1-1/+3
functions that take a single argument (plain lambdas) into one AST node (Function) that contains a Pattern node describing the arguments. Current patterns are single lazy arguments (VarPat) and matching against an attribute set (AttrsPat). This refactoring allows other kinds of patterns to be added easily, such as Haskell-style @-patterns, or list pattern matching.
2008-08-11 * Removed the "valid values" feature. Nobody uses it anyway.Eelco Dolstra1-1/+1
2006-08-17 * Test for `nix-instantiate --eval-only --xml'.Eelco Dolstra1-0/+13