fix stream errors
This commit is contained in:
@@ -157,7 +157,7 @@ pub fn clause_type_form(name: Atom, arity: usize) -> Option<ClauseType> {
|
||||
))),
|
||||
(atom!("keysort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::KeySort)),
|
||||
(atom!("\\=="), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::NotEq)),
|
||||
(atom!("read"), 1) => Some(ClauseType::BuiltIn(BuiltInClauseType::Read)),
|
||||
(atom!("read"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::Read)),
|
||||
(atom!("sort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::Sort)),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use crate::arena::*;
|
||||
use crate::atom_table::*;
|
||||
use crate::parser::ast::*;
|
||||
use crate::temp_v;
|
||||
|
||||
use crate::clause_types::*;
|
||||
use crate::forms::*;
|
||||
@@ -490,7 +489,7 @@ pub trait CallPolicy: Any + fmt::Debug {
|
||||
}
|
||||
&BuiltInClauseType::Read => {
|
||||
let stream = machine_st.get_stream_or_alias(
|
||||
machine_st[temp_v!(1)],
|
||||
machine_st.registers[1],
|
||||
stream_aliases,
|
||||
atom!("read"),
|
||||
2,
|
||||
|
||||
@@ -1369,9 +1369,7 @@ impl MachineState {
|
||||
arity: usize,
|
||||
) -> MachineStub {
|
||||
let stub = functor_stub(caller, arity);
|
||||
let payload = vec![stream_as_cell!(stream)];
|
||||
|
||||
let err = self.permission_error(perm, err_atom, payload);
|
||||
let err = self.permission_error(perm, err_atom, stream_as_cell!(stream));
|
||||
|
||||
return self.error_form(err, stub);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user