forked from LogicalContracts/LogicalEnglish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
le_local.pl
executable file
·37 lines (27 loc) · 995 Bytes
/
le_local.pl
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
/* le_local: a prolog module for LE handling of a local filesystem.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
:- module(le_local,
[load_file_module/3,
this_capsule/1,
portray_clause_ind/1,
update_file/3,
myDeclaredModule/1
]).
load_file_module(FileName, FileName, _) :-
load_files([FileName], [module(FileName)]).
this_capsule(user).
%thread_self(M). % current_module(M) messes it up
portray_clause_ind(Clause) :-
portray_clause(Clause).
:- multifile kp_loader:myDeclaredModule/1.
myDeclaredModule(user).
update_file(NewFileName, _, String) :-
open(NewFileName, write, Stream, []),
write(Stream, String),
close(Stream).