]> Repositorios git - scryer-prolog.git/commitdiff
Disable check of atom and leverage to open/4 the domain_error
authorAdrián Arroyo Calle <[email protected]>
Fri, 29 Oct 2021 21:51:30 +0000 (23:51 +0200)
committerAdrián Arroyo Calle <[email protected]>
Fri, 29 Oct 2021 21:51:30 +0000 (23:51 +0200)
src/lib/pio.pl

index c9653b72435d870386a9baf794abee2768c75a5e..3f0e9c60c279d035580e52ac4ebeb84548fb54a0 100644 (file)
@@ -6,7 +6,7 @@
 :- use_module(library(error)).
 :- use_module(library(freeze)).
 :- use_module(library(iso_ext), [setup_call_cleanup/3, partial_string/3]).
-:- use_module(library(lists), [member/2]).
+:- use_module(library(lists), [member/2, maplist/2]).
 :- use_module(library(format), [format/3]).
 
 :- meta_predicate(phrase_from_file(2, ?)).
@@ -18,8 +18,6 @@ phrase_from_file(NT, File) :-
 
 phrase_from_file(NT, File, Options) :-
     (   var(File) -> instantiation_error(phrase_from_file/3)
-    ;   (\+ atom(File) ; File = []) ->
-            domain_error(source_sink, File, phrase_from_file/3)
     ;   must_be(list, Options),
         (   member(Var, Options), var(Var) -> instantiation_error(phrase_from_file/3)
         ;   member(type(Type), Options) ->