From: Mark Thom Date: Thu, 25 Nov 2021 02:11:14 +0000 (-0700) Subject: throw instantiation error if Arity is a variable in abolish/1 X-Git-Tag: v0.9.0^2~119 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=1b3f290037f8864d58059d5dee85f4562a71fb0e;p=scryer-prolog.git throw instantiation error if Arity is a variable in abolish/1 --- diff --git a/src/lib/builtins.pl b/src/lib/builtins.pl index 2f3066f3..41215a80 100644 --- a/src/lib/builtins.pl +++ b/src/lib/builtins.pl @@ -1003,6 +1003,7 @@ module_abolish(Pred, Module) :- ; throw(error(permission_error(modify, static_procedure, Pred), abolish/1)) ) ) + ; var(Arity) -> throw(error(instantiation_error, abolish/1)) ; throw(error(type_error(integer, Arity), abolish/1)) ) ; throw(error(type_error(predicate_indicator, Module:Pred), abolish/1))