From 2480c6633cf351802d643e70270f4b8e41089e17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Fri, 29 Oct 2021 23:51:30 +0200 Subject: [PATCH] Disable check of atom and leverage to open/4 the domain_error --- src/lib/pio.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -> -- 2.54.0