try to use nicer swi interface
This commit is contained in:
parent
9686275b34
commit
275e2c0059
@ -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) :-
|
||||
!,
|
||||
|
Reference in New Issue
Block a user