mod prperty step 1

This commit is contained in:
Vítor Santos Costa 2014-06-16 15:00:04 +01:00
parent 0a1b7de414
commit ff2a7a364f

View File

@ -1054,6 +1054,8 @@ Start a new (source-)module
'$declare_module'(Name, _Test, Context, _File, _Line) :-
add_import_module(Name, Context, start).
module_property(Mod, class(L)) :-
'$module_class'(Mod, L).
module_property(Mod, line_count(L)) :-
recorded('$module','$module'(_F,Mod,_,L),_).
module_property(Mod, file(F)) :-
@ -1061,6 +1063,24 @@ module_property(Mod, file(F)) :-
module_property(Mod, exports(Es)) :-
recorded('$module','$module'(_,Mod,Es,_),_).
'$module_class'(system, L) :- '$system_module'(L).
'$module_class'(library, L) :- '$library_module'(L).
'$module_class'(user, L) :- '$user_module'(L).
'$module_class'(temporary, L) :- fail.
'$module_class'(test, L) :- fail.
'$module_class'(development, L) :- fail.
'$system_module'(prolog).
'$system_module'(system).
'$library_module'(M1) :-
recorded('$module','$module'(F, M1, _MyExports,_Line),_),
library_directory(D),
sub_atom(F, 0, _, _, D).
'$user_module'(_).
ls_imports :-
recorded('$import','$import'(M0,M,G0,G,_N,_K),_R),
numbervars(G0+G, 0, _),