try to use nicer swi interface

This commit is contained in:
Vitor Santos Costa 2016-07-31 10:40:29 -05:00
parent 9686275b34
commit 275e2c0059

View File

@ -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) :-
!,