]> Repositorios git - scryer-prolog.git/commitdiff
retain error context (load/1) when using :- D.
authorMarkus Triska <[email protected]>
Mon, 16 Mar 2026 06:36:55 +0000 (07:36 +0100)
committerMarkus Triska <[email protected]>
Mon, 16 Mar 2026 06:36:55 +0000 (07:36 +0100)
src/toplevel.pl

index 465c37c08e9ea512d3c23441ff0e7a89fb425ec7..2a1b50340e307b6f86f8c6be66748863d28afa26 100644 (file)
@@ -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", []),