allow import of DCGs.

This commit is contained in:
Vitor Santos Costa 2011-09-05 03:07:40 +02:00
parent 01c80d77e0
commit 9a32038e8c

View File

@ -124,6 +124,11 @@ module(N) :-
integer(K), atom(N), !,
'$do_import'(N, K, M, T),
'$import'(L,M,T).
'$import'([N//K|L],M,T) :-
integer(K), atom(N), !,
N1 is N+2,
'$do_import'(N1, K, M, T),
'$import'(L,M,T).
'$import'([PS|L],_,_) :-
'$do_error'(domain_error(predicate_spec,PS),import([PS|L])).