2004-10-29 14:22:49 +03:00
|
|
|
init initNixExprHelpers
|
|
|
|
|
2004-10-27 01:54:26 +03:00
|
|
|
Pos | string int int | Pos |
|
|
|
|
NoPos | | Pos |
|
|
|
|
|
2008-08-14 13:04:22 +03:00
|
|
|
Function | Pattern Expr Pos | Expr |
|
2004-10-27 01:54:26 +03:00
|
|
|
Assert | Expr Expr Pos | Expr |
|
|
|
|
With | Expr Expr Pos | Expr |
|
|
|
|
If | Expr Expr Expr | Expr |
|
|
|
|
OpNot | Expr | Expr |
|
|
|
|
OpEq | Expr Expr | Expr |
|
|
|
|
OpNEq | Expr Expr | Expr |
|
|
|
|
OpAnd | Expr Expr | Expr |
|
|
|
|
OpOr | Expr Expr | Expr |
|
|
|
|
OpImpl | Expr Expr | Expr |
|
|
|
|
OpUpdate | Expr Expr | Expr |
|
|
|
|
SubPath | Expr Expr | Expr |
|
|
|
|
OpHasAttr | Expr string | Expr |
|
|
|
|
OpPlus | Expr Expr | Expr |
|
2005-07-25 18:05:34 +03:00
|
|
|
OpConcat | Expr Expr | Expr |
|
2006-05-01 17:01:47 +03:00
|
|
|
ConcatStrings | ATermList | Expr |
|
2004-10-27 01:54:26 +03:00
|
|
|
Call | Expr Expr | Expr |
|
|
|
|
Select | Expr string | Expr |
|
|
|
|
Var | string | Expr |
|
|
|
|
Int | int | Expr |
|
2006-10-16 18:55:34 +03:00
|
|
|
|
|
|
|
# Strings in the evaluator carry a so-called `context' (the ATermList)
|
|
|
|
# which is a list of strings representing store paths. This is to
|
|
|
|
# allow users to write things like
|
|
|
|
#
|
|
|
|
# "--with-freetype2-library=" + freetype + "/lib"
|
|
|
|
#
|
|
|
|
# where `freetype' is a derivation (or a source to be copied to the
|
|
|
|
# store). If we just concatenated the strings without keeping track
|
|
|
|
# of the referenced store paths, then if the string is used as a
|
|
|
|
# derivation attribute, the derivation will not have the correct
|
|
|
|
# dependencies in its inputDrvs and inputSrcs.
|
|
|
|
#
|
|
|
|
# The semantics of the context is as follows: when a string with
|
|
|
|
# context C is used as a derivation attribute, then the derivations in
|
|
|
|
# C will be added to the inputDrvs of the derivation, and the other
|
|
|
|
# store paths in C will be added to the inputSrcs of the derivations.
|
|
|
|
#
|
|
|
|
# For canonicity, the store paths should be in sorted order.
|
|
|
|
Str | string ATermList | Expr |
|
2006-10-17 17:01:45 +03:00
|
|
|
Str | string | Expr | ObsoleteStr
|
2006-10-16 18:55:34 +03:00
|
|
|
|
2007-11-30 18:48:45 +02:00
|
|
|
# Internal to the parser, doesn't occur in ASTs.
|
|
|
|
IndStr | string | Expr |
|
|
|
|
|
2006-10-16 18:55:34 +03:00
|
|
|
# A path is a reference to a file system object that is to be copied
|
|
|
|
# to the Nix store when used as a derivation attribute. When it is
|
|
|
|
# concatenated to a string (i.e., `str + path'), it is also copied and
|
|
|
|
# the resulting store path is concatenated to the string (with the
|
|
|
|
# store path in the context). If a string or path is concatenated to
|
|
|
|
# a path (i.e., `path + str' or `path + path'), the result is a new
|
|
|
|
# path (if the right-hand side is a string, the context must be
|
|
|
|
# empty).
|
2004-10-27 01:54:26 +03:00
|
|
|
Path | string | Expr |
|
2006-10-16 18:55:34 +03:00
|
|
|
|
2004-10-27 01:54:26 +03:00
|
|
|
List | ATermList | Expr |
|
|
|
|
BlackHole | | Expr |
|
|
|
|
Undefined | | Expr |
|
2006-05-03 00:39:02 +03:00
|
|
|
Removed | | Expr |
|
2004-10-27 01:54:26 +03:00
|
|
|
PrimOp | int ATermBlob ATermList | Expr |
|
|
|
|
Attrs | ATermList | Expr |
|
|
|
|
Closed | Expr | Expr |
|
|
|
|
Rec | ATermList ATermList | Expr |
|
|
|
|
Bool | ATerm | Expr |
|
|
|
|
Null | | Expr |
|
|
|
|
|
|
|
|
Bind | string Expr Pos | ATerm |
|
2006-10-17 17:01:45 +03:00
|
|
|
Bind | string Expr | ATerm | ObsoleteBind
|
2004-10-27 01:54:26 +03:00
|
|
|
Inherit | Expr ATermList Pos | ATerm |
|
|
|
|
|
|
|
|
Scope | | Expr |
|
|
|
|
|
2008-08-14 13:04:22 +03:00
|
|
|
VarPat | string | Pattern |
|
|
|
|
AttrsPat | ATermList | Pattern |
|
2008-08-14 15:53:29 +03:00
|
|
|
AtPat | Pattern Pattern | Pattern |
|
2008-08-14 13:04:22 +03:00
|
|
|
|
2008-08-11 16:36:40 +03:00
|
|
|
Formal | string DefaultValue | ATerm |
|
2006-07-24 18:16:03 +03:00
|
|
|
|
|
|
|
DefaultValue | Expr | DefaultValue |
|
|
|
|
NoDefaultValue | | DefaultValue |
|
2004-10-27 01:54:26 +03:00
|
|
|
|
|
|
|
True | | ATerm |
|
|
|
|
False | | ATerm |
|
|
|
|
|
|
|
|
PrimOpDef | int ATermBlob | ATerm |
|
|
|
|
|
|
|
|
AttrRHS | Expr Pos | ATerm |
|
|
|
|
|
|
|
|
eTrue = makeBool(makeTrue())
|
|
|
|
eFalse = makeBool(makeFalse())
|