-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling assertz/1 with stream-based clause #2638
Comments
Panic should be fixed indeed, but you don't need to allocate stream handle on a heap manually. All streams can be inspected using :- initialization(test).
test :-
open('./learn/test-page.dj', read, Stream). And then when you want to retrieve stream handle just do:
|
Even better is to use stream alias: :- initialization(setup_stream).
setup_stream :-
open('file.pl', read, _, [alias(my_file)]). And then you can use that alias freely throughout your program for example using |
Thank you. That helps! Yesterday, I also tried to unwrap the stream alias HeapCellValueTag::Cons case was separated from loader.rs:1399 only so that I could make sure where the panic came from. |
Hello,
I've tried to call
assertz/1
by passing it a clause depending on a stream as follows:Is there something i could do to make it work?
I wonder if some additional case(s) could be added to heap.rs.
The broader context is that I'm trying to make the prolog-based interactive prover LPTP to work with Scryer Prolog but I could not go past those lines. I started from GNU Prolog configuration file where
assert/1
is declared withassertz/1
in its body.The text was updated successfully, but these errors were encountered: