-
Hello. Is there a way to load or reload a file from the Scryer REPL? That is, I've ran
and have made some changes to |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I just found #2216 and have a feeling this might not currently be possible |
Beta Was this translation helpful? Give feedback.
-
Oh, it looks like I just need to do |
Beta Was this translation helpful? Give feedback.
-
You can just ?- consult(example).
true.
?- [example].
% Alternative syntax for consult/1
true.
?- use_module(example).
% Works like consult/1 for normal files, but also handles modules.
true.
?- use_module('example.pl').
% You can give the full name for every one of those if you like.
% Scryer Prolog doesn't automatically handle .prolog extension
% like the .pl extension, so you might need this.
true. When I'm testing a module, I usually just prepend |
Beta Was this translation helpful? Give feedback.
You can just
consult/1
it, oruse_module/1
:When I'm testing a module, I usually just prepend
use_module(module_name)
before all my queries so that I'm always testing the latest version. These don't always work how you would expect them, but it works for most cases.