Build defs.pl from defs.txt.

This commit is contained in:
Simon Forman
2019-08-10 22:03:44 -07:00
parent 90bccece6a
commit e49b0b70cb
5 changed files with 9 additions and 28 deletions
+4 -2
View File
@@ -34,7 +34,9 @@ stream_to_codes(Ch, Stream, [Ch|Codes]) :- stream_to_codes(Stream, Codes).
print_defs :-
findall(def(Name, Body), def(Name, Body), List),
maplist(print_def, List).
open(`defs.pl`, write, Stream),
maplist(print_def(Stream), List),
close(Stream).
print_def(Def) :- write(Def), write(`.`), nl.
print_def(Stream, Def) :- write(Stream, Def), write(Stream, `.`), nl(Stream).