-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodule.pro
More file actions
47 lines (35 loc) · 1.41 KB
/
Copy pathmodule.pro
File metadata and controls
47 lines (35 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% deprecated; use load.pro
/** <module> Tailoring SWI-Prolog module system to our requirements
Usage:
- Declare each module with module_definition/2.
- Call load_modules/0.
- Debug topics for library(debug):
- `connector`: declarations, connections
Known problems:
- A module should not be loaded using both this mechanism and use_module/2.
Otherwise there will be a permission_error.
- This confuses PlDoc.
Maybe we should write our own documentation system.
- SWI-Prolog 7.6.4 assumes that each file is loaded at most once.
We may have to use the `stream` option of load_files/2 to go against this tendency.
But then we lose reloading ability.
Things:
- A _qcon_ (qualified connector name) is a Module:Name term.
- A _pin_ is a Name/Arity term.
*/
% -------------------- debug
:- debug(module). % DEBUG
%:- debug(module_connection). % DEBUG
debug_module(Format, Args) :-
string_concat("module: ", Format, Format0),
debug(module, Format0, Args).
debug_module_connection(Format, Args) :-
string_concat("module_connection: ", Format, Format0),
debug(module_connection, Format0, Args).
:- include("imperative.pro").
:- include("internal/module_doc.pro").
:- include("internal/module_derive.pro").
:- include("internal/module_check.pro").
:- include("internal/module_deprecated.pro").
:- include("internal/module_swi.pro").
:- include("internal/module_load.pro").