From: Adrián Arroyo Calle Date: Fri, 29 Oct 2021 21:51:30 +0000 (+0200) Subject: Disable check of atom and leverage to open/4 the domain_error X-Git-Tag: v0.9.0~37^2~1 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=2480c6633cf351802d643e70270f4b8e41089e17;p=scryer-prolog.git Disable check of atom and leverage to open/4 the domain_error --- diff --git a/src/lib/pio.pl b/src/lib/pio.pl index c9653b72..3f0e9c60 100644 --- a/src/lib/pio.pl +++ b/src/lib/pio.pl @@ -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) ->