reproduce panick originating in set_input/1 call from top-level

Signed-off-by: Thierry Marianne <thierry@marianne.io>
This commit is contained in:
Thierry Marianne
2025-09-13 14:37:53 +02:00
parent dc05526c71
commit 5f58e1cfd7
6 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1 @@
true.

View File

@@ -0,0 +1,10 @@
:- use_module(library(files)).
main :-
current_input(UserStream),
open('./input', read, InputStream),
set_input(InputStream),
read_term(T, []), write(T),
set_input(UserStream).
:- initialization(main).

View File

@@ -0,0 +1 @@
true

View File

@@ -0,0 +1 @@
args = ["-f", "--no-add-history", "-g", "consult('set_input_from_top-level.pl').", "-g", "halt."]