From: Markus Triska Date: Mon, 16 Mar 2026 06:36:55 +0000 (+0100) Subject: retain error context (load/1) when using :- D. X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=1c9fd1501af60bb5ec38c461aaddf117d00bb8cf;p=scryer-prolog.git retain error context (load/1) when using :- D. --- diff --git a/src/toplevel.pl b/src/toplevel.pl index 465c37c0..2a1b5034 100644 --- a/src/toplevel.pl +++ b/src/toplevel.pl @@ -222,7 +222,9 @@ expand_op_list([Op | OtherOps], Pri, Spec, [(:- op(Pri, Spec, Op)) | OtherResult % Implement the include/1 directive via term expansion. -user:term_expansion((:- include(File0)), Clauses) :- +user:term_expansion((:- Include), Clauses) :- + nonvar(Include), + Include = include(File0), ( si:atom_si(File0) -> atom_chars(File0, File), format("% Warning: include/1: atom arguments are deprecated. Use chars for file paths:~n", []),