From 275e2c0059d0828221a61017d4be5cb49f52f445 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 31 Jul 2016 10:40:29 -0500 Subject: [PATCH] try to use nicer swi interface --- pl/error.yap | 7 +++++++ 1 file changed, 7 insertions(+) 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) :- !,