use occurs check when enabled in UnifyValue (#885)

This commit is contained in:
Mark Thom
2021-03-22 22:05:03 -06:00
parent 9f861dfe89
commit 7520fe7000
4 changed files with 23 additions and 76 deletions

View File

@@ -306,6 +306,7 @@ pub(crate) enum SystemClauseType {
SetNSTOAsUnify,
SetSTOWithErrorAsUnify,
HomeDirectory,
DebugHook,
}
impl SystemClauseType {
@@ -592,6 +593,7 @@ impl SystemClauseType {
&SystemClauseType::SetNSTOAsUnify => clause_name!("$set_nsto_as_unify"),
&SystemClauseType::HomeDirectory => clause_name!("$home_directory"),
&SystemClauseType::SetSTOWithErrorAsUnify => clause_name!("$set_sto_with_error_as_unify"),
&SystemClauseType::DebugHook => clause_name!("$debug_hook"),
}
}
@@ -840,6 +842,7 @@ impl SystemClauseType {
("$set_nsto_as_unify", 0) => Some(SystemClauseType::SetNSTOAsUnify),
("$set_sto_with_error_as_unify", 0) => Some(SystemClauseType::SetSTOWithErrorAsUnify),
("$home_directory", 1) => Some(SystemClauseType::HomeDirectory),
("$debug_hook", 0) => Some(SystemClauseType::DebugHook),
_ => None,
}
}