From 875546e36ad8666223437aa30f07d253c46742c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 18 Mar 2014 17:24:20 +0000 Subject: [PATCH] don't optimise sub-args, as it may introduce new variables. --- pl/modules.yap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pl/modules.yap b/pl/modules.yap index bfb28bc1e..cdb39ba75 100755 --- a/pl/modules.yap +++ b/pl/modules.yap @@ -512,7 +512,9 @@ expand_goal(G, G). '$should_expand'(A,HVars), !, ( X ==0 -> - '$meta_expansion0'(A,CurMod,M,HM,NA,HVars) + '$values'('$c_arith',Old, false), + '$meta_expansion0'(A,CurMod,M,HM,NA,HVars), + '$values'('$c_arith', _False, Old) ; NA = M:A ),