aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/compiler.boot3
-rw-r--r--src/interp/define.boot8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 817517ef..357e8564 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1438,7 +1438,8 @@ compLogicalNot(x,m,e) ==
$normalizeTree and resolve(m,$Boolean) = $Boolean => $Boolean
$EmptyMode
yT := comp(y,yTarget,e) or return nil
- yTarget = $Boolean => (rplac(first yT, ["NOT",yT.expr]); yT)
+ yT.mode = $Boolean and yTarget = $Boolean =>
+ [["NOT",yT.expr],yT.mode,yT.env]
compResolveCall("not",[yT],m,yT.env)
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 8cbc7ce9..543450d9 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1482,7 +1482,13 @@ doIt(item,$predl) ==
item is ["%SignatureImport",:.] =>
[.,.,$e] := compSignatureImport(item,$EmptyMode,$e)
mutateToNothing item
- item is ["IF",:.] => doItIf(item,$predl,$e)
+ item is ["IF",p,x,y] =>
+ p is ["not",p'] =>
+ rplac(second item,p')
+ rplac(third item,y)
+ rplac(fourth item,x)
+ doIt(item,$predl)
+ doItIf(item,$predl,$e)
item is ["where",b,:l] => compOrCroak(item,$EmptyMode,$e)
item is ["MDEF",:.] => [.,.,$e]:= compOrCroak(item,$EmptyMode,$e)
item is ['DEF,[op,:.],:.] =>