diff --git a/pl/arith.yap b/pl/arith.yap index c4438d7de..e788c060d 100644 --- a/pl/arith.yap +++ b/pl/arith.yap @@ -337,7 +337,9 @@ expand_expr(Op, X, Y, O, Q, P) :- '$do_and'(Z = X, Y = W, E). -'$goal_expansion_allowed'(phrase(NT,_Xs0,_Xs), Mod). +'$goal_expansion_allowed'(phrase(NT,_Xs0,_Xs), Mod) :- + callable(NT), + atom(Mod). %% contains_illegal_dcgnt(+Term) is semidet. %