From: Adrián Arroyo Calle Date: Tue, 16 Nov 2021 22:22:24 +0000 (+0100) Subject: Fix uninstantiation_error missing. Fix #1031 X-Git-Tag: v0.9.0~25^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=72a88d1f91d33e7ec49d9460383572260a9305bf;p=scryer-prolog.git Fix uninstantiation_error missing. Fix #1031 --- diff --git a/src/lib/atts.pl b/src/lib/atts.pl index ed241f7e..5906466b 100644 --- a/src/lib/atts.pl +++ b/src/lib/atts.pl @@ -101,13 +101,13 @@ expand_terms(Atts, Module) --> put_attrs_var_check --> [(put_atts(Var, Attr) :- nonvar(Var), - throw(error(type_error(variable, Var), put_atts/2))), + throw(error(uninstantiation_error(Var), put_atts/2))), (put_atts(Var, Attr) :- var(Attr), throw(error(instantiation_error, put_atts/2)))]. get_attrs_var_check(Module) --> [(get_atts(Var, Attr) :- nonvar(Var), - throw(error(type_error(variable, Var), get_atts/2))), + throw(error(uninstantiation_error(Var), get_atts/2))), (get_atts(Var, Attr) :- var(Attr), !, '$get_attr_list'(Var, Ls), diff --git a/src/lib/error.pl b/src/lib/error.pl index 99592790..a79bd560 100644 --- a/src/lib/error.pl +++ b/src/lib/error.pl @@ -40,7 +40,7 @@ must_be_(Type, _) :- instantiation_error(must_be/2). must_be_(var, Term) :- ( var(Term) -> true - ; throw(error(uninstantiation_error, must_be/2)) + ; throw(error(uninstantiation_error(Term), must_be/2)) ). must_be_(integer, Term) :- check_(integer, integer, Term). must_be_(atom, Term) :- check_(atom, atom, Term).