about summary refs log tree commit diff
path: root/src/libexpr/expr-to-xml.cc
AgeCommit message (Collapse)AuthorFilesLines
2008-08-14 * Added an experimental feature suggested by Andres: ellipses ("...")Eelco Dolstra1-1/+3
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-2/+8
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-9/+21
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-10/+2
2008-05-21 * GCC 4.3.0 (Fedora 9) compatibility fixes. Reported by Gour andEelco Dolstra1-0/+2
Armijn Hemel.
2007-01-13 * printTermAsXML: treat derivations specially; emit an elementEelco Dolstra1-11/+55
<derivation outPath=... drvPath=...> attrs </derivation>. Only emit the attributes of any specific derivation only. This prevents exponententially large XML output due to the absense of sharing.
2007-01-13 * Make printing an expression as XML interruptible.Eelco Dolstra1-0/+3
2007-01-13 * Cleanup.Eelco Dolstra1-1/+1
2006-10-16 * Big cleanup of the semantics of paths, strings, contexts, stringEelco Dolstra1-14/+8
concatenation and string coercion. This was a big mess (see e.g. NIX-67). Contexts are now folded into strings, so that they don't cause evaluation errors when they're not expected. The semantics of paths has been clarified (see nixexpr-ast.def). toString() and coerceToString() have been merged. Semantic change: paths are now copied to the store when they're in a concatenation (and in most other situations - that's the formalisation of the meaning of a path). So "foo " + ./bla evaluates to "foo /nix/store/hash...-bla", not "foo /path/to/current-dir/bla". This prevents accidental impurities, and is more consistent with the treatment of derivation outputs, e.g., `"foo " + bla' where `bla' is a derivation. (Here `bla' would be replaced by the output path of `bla'.)
2006-10-11 * Removed URIs from the evaluator (NIX-66). They are now just anotherEelco Dolstra1-3/+0
kind of notation for strings.
2006-10-03 * toXML: propagate the context to allow derivations to be used in theEelco Dolstra1-6/+13
argument.
2006-09-04 * Use a proper namespace.Eelco Dolstra1-2/+7
* Optimise header file usage a bit. * Compile the parser as C++.
2006-08-24 * Refactoring.Eelco Dolstra1-0/+92