ADDED: working_directory/2, addressing a remaining aspect of #511

This commit is contained in:
Markus Triska
2020-07-14 22:37:05 +02:00
parent 5134e64cae
commit 94e9e17c79
3 changed files with 38 additions and 1 deletions

View File

@@ -177,6 +177,7 @@ pub enum SystemClauseType {
DirectoryExists,
MakeDirectory,
DeleteFile,
WorkingDirectory,
DeleteAttribute,
DeleteHeadAttribute,
DynamicModuleResolution(usize),
@@ -343,6 +344,7 @@ impl SystemClauseType {
&SystemClauseType::DirectoryExists => clause_name!("$directory_exists"),
&SystemClauseType::MakeDirectory => clause_name!("$make_directory"),
&SystemClauseType::DeleteFile => clause_name!("$delete_file"),
&SystemClauseType::WorkingDirectory => clause_name!("$working_directory"),
&SystemClauseType::REPL(REPLCodePtr::CompileBatch) => clause_name!("$compile_batch"),
&SystemClauseType::REPL(REPLCodePtr::UseModule) => clause_name!("$use_module"),
&SystemClauseType::REPL(REPLCodePtr::UseQualifiedModule) => {
@@ -678,6 +680,7 @@ impl SystemClauseType {
("$directory_exists", 1) => Some(SystemClauseType::DirectoryExists),
("$make_directory", 1) => Some(SystemClauseType::MakeDirectory),
("$delete_file", 1) => Some(SystemClauseType::DeleteFile),
("$working_directory", 2) => Some(SystemClauseType::WorkingDirectory),
("$use_module", 1) => Some(SystemClauseType::REPL(REPLCodePtr::UseModule)),
("$use_module_from_file", 1) =>
Some(SystemClauseType::REPL(REPLCodePtr::UseModuleFromFile)),