diff --git a/pl/error.yap b/pl/error.yap index 08e8a4bea..49a5188a5 100644 --- a/pl/error.yap +++ b/pl/error.yap @@ -108,6 +108,9 @@ must_be_of_type(callable, X) :- must_be_of_type(atom, X) :- !, is_atom(X, _). +must_be_of_type(module, X) :- + !, + is_atom(X, _). must_be_of_type(predicate_indicator, X) :- !, is_predicate_indicator(X, _). @@ -117,8 +120,12 @@ must_be_of_type(Type, X) :- ; is_not(Type, X) ). +inline(must_be_of_type( atom, X ), is_atom(X, _) ). +inline(must_be_of_type( module, X ), is_module(X, _) ). inline(must_be_of_type( callable, X ), is_callable(X, _) ). inline(must_be_of_type( callable, X ), is_callable(X, _) ). +inline(must_be_atom( X ), is_callable(X, _) ). +inline(must_be_module( X ), is_atom(X, _) ). must_be_of_type(predicate_indicator, X, Comment) :- !,