; Term = ExpandedTerm
).
-
term_expansion_list([], ExpandedTerms, ExpandedTerms).
term_expansion_list([Term|Terms], ExpandedTermsHead, ExpandedTermsTail) :-
expand_term(Term, ExpandedTerm0),
load_context_path(Module, Path) :-
( prolog_load_context(directory, CurrentDir) ->
atom_concat(CurrentDir, Path, Module)
- ; atom_concat(_, '.pl', Module) ->
- Module = Path
- ; atom_concat(Module, '.pl', Path)
+ ; Module = Path
).
}
}
}
+ Addr::Char(c) => {
+ let atom = clause_name!(c.to_string(), self.atom_tbl);
+ self.stream_from_file_spec(atom, indices, &options)?
+ }
Addr::PStrLocation(h, n) => {
match &self.heap[h] {
&HeapCellValue::PartialString(_, true) => {
pub mod readline {
use crate::machine::streams::Stream;
use crate::rustyline::error::ReadlineError;
- use crate::rustyline::{Cmd, Editor, KeyEvent};
+ use crate::rustyline::{Cmd, Config, Editor, KeyEvent};
use std::io::{Cursor, Error, ErrorKind, Read};
static mut PROMPT: bool = false;
impl ReadlineStream {
#[inline]
pub fn new(pending_input: String) -> Self {
- let mut rl = Editor::<()>::new();
+ let config = Config::builder()
+ .check_cursor_position(true)
+ .build();
+
+ let mut rl = Editor::<()>::with_config(config); //Editor::<()>::new();
if let Some(mut path) = dirs_next::home_dir() {
path.push(HISTORY_FILE);
if path.exists() {
; member(Arg0, ["-v", "--version"]) -> print_version
; member(Arg0, ["-g", "--goal"]) -> gather_goal(g, Args, Goals0)
; atom_chars(Mod, Arg0),
- catch(use_module(Mod), E, print_exception(E))
+ catch(use_module(Mod), E, print_exception(E)),
+ nl
),
delegate_task(Args, Goals0).
( Item == user ->
catch(load(user_input), E, print_exception_with_check(E))
;
- consult(Item)
+ submit_query_and_print_results(consult(Item), [])
)
;
catch(type_error(atom, Item, repl/0),