use phrase_from_file/2 directly on the file name

This commit is contained in:
Markus Triska
2022-05-15 10:19:00 +02:00
parent 66e047083a
commit 77f8d52271

View File

@@ -70,9 +70,8 @@ load_structure_([C|Cs], [E], Options, What) :-
load_(What, [C|Cs], E, Options).
load_structure_(file(Fs), [E], Options, What) :-
must_be(list, Options),
must_be(list, Fs),
atom_chars(File, Fs),
once(phrase_from_file(seq(Cs), File)),
must_be(chars, Fs),
once(phrase_from_file(seq(Cs), Fs)),
load_(What, Cs, E, Options).
load_structure_(stream(Stream), [E], Options, What) :-
must_be(list, Options),