correct misleading error for modules (#300)

This commit is contained in:
Mark Thom
2020-04-12 12:51:59 -06:00
parent 2ce4f602c0
commit 28099b9812
6 changed files with 106 additions and 22 deletions

View File

@@ -288,7 +288,11 @@ impl Machine {
Ok(self.indices.insert_module(module))
} else {
Err(SessionError::ModuleNotFound)
let err = ExistenceError::SourceSink(ModuleSource::File(
clause_name!("$toplevel"),
));
Err(SessionError::ExistenceError(err))
}
}