mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
* Refactoring: combine functions that take an attribute set and
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.
This commit is contained in:
parent
c03b729319
commit
efe4b690ae
12 changed files with 184 additions and 148 deletions
|
@ -21,11 +21,9 @@ MakeError(TypeError, EvalError)
|
|||
property of the ATerm library allows us to implement caching of
|
||||
normals forms efficiently. */
|
||||
typedef ATerm Expr;
|
||||
|
||||
typedef ATerm DefaultValue;
|
||||
typedef ATerm ValidValues;
|
||||
|
||||
typedef ATerm Pos;
|
||||
typedef ATerm Pattern;
|
||||
|
||||
|
||||
/* A STL vector of ATerms. Should be used with great care since it's
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue