From 1c9fd1501af60bb5ec38c461aaddf117d00bb8cf Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Mon, 16 Mar 2026 07:36:55 +0100 Subject: [PATCH] retain error context (load/1) when using :- D. --- src/toplevel.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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", []), -- 2.54.0