mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 04:30:59 +01:00
* Some hacks to simulate conventional laziness.
This commit is contained in:
parent
cd9d10d4e3
commit
981afe821c
7 changed files with 47 additions and 10 deletions
|
|
@ -57,7 +57,7 @@ static Expr fixAttrs(int recursive, ATermList as)
|
|||
bool fromScope = matchScope(src);
|
||||
for (ATermIterator j(names); j; ++j) {
|
||||
Expr rhs = fromScope ? makeVar(*j) : makeSelect(src, *j);
|
||||
*is = ATinsert(*is, makeBind(*j, rhs, pos));
|
||||
*is = ATinsert(*is, makeBind(*j, allocCell(rhs), pos));
|
||||
}
|
||||
} else bs = ATinsert(bs, *i);
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ binds
|
|||
|
||||
bind
|
||||
: ID '=' expr ';'
|
||||
{ $$ = makeBind($1, $3, CUR_POS); }
|
||||
{ $$ = makeBind($1, allocCell($3), CUR_POS); }
|
||||
| INHERIT inheritsrc ids ';'
|
||||
{ $$ = makeInherit($2, $3, CUR_POS); }
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue