1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 23:13:14 +02:00

* Default function arguments.

This commit is contained in:
Eelco Dolstra 2003-11-05 15:34:12 +00:00
parent 0690c1c9c0
commit 80bb477cc4
3 changed files with 17 additions and 9 deletions

View file

@ -171,7 +171,10 @@ Expr substitute(const ATermMap & subs, Expr e)
ATermMap subs2(subs);
ATermList fs = formals;
while (!ATisEmpty(fs)) {
if (!ATmatch(ATgetFirst(fs), "<str>", &s)) abort();
Expr def;
if (!ATmatch(ATgetFirst(fs), "NoDefFormal(<str>)", &s) &&
!ATmatch(ATgetFirst(fs), "DefFormal(<str>, <term>)", &s))
abort();
subs2.remove(s);
fs = ATgetNext(fs);
}