commit ba988852467da3a3b4655f77110025322bec2296
parent c80c71f920b0e94370338341fef35b7f6fd4f07c
Author: Sebastian <sebastian@sebsite.pw>
Date: Thu, 28 Apr 2022 17:27:14 -0400
hare::module: rename module_not_found to notfound
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hare/module/scan.ha b/hare/module/scan.ha
@@ -41,7 +41,7 @@ export fn scan(ctx: *context, path: str) (version | error) = {
let deps: []ast::ident = [];
let ft = match (type_for_ext(path)) {
case void =>
- return module_not_found;
+ return notfound;
case let ft: filetype =>
yield ft;
};
@@ -83,7 +83,7 @@ export fn scan(ctx: *context, path: str) (version | error) = {
defer free(readme);
if (len(ver.inputs) == 0 && !fs::exists(ctx.fs, readme)) {
// TODO: HACK: README is a workaround for haredoc issues
- return module_not_found;
+ return notfound;
};
let tmp: [sha256::SIZE]u8 = [0...];
@@ -332,7 +332,7 @@ export fn lookup(ctx: *context, name: ast::ident) (version | error) = {
case error => void;
};
};
- return module_not_found;
+ return notfound;
};
fn type_for_ext(name: str) (filetype | void) = {
diff --git a/hare/module/types.ha b/hare/module/types.ha
@@ -56,7 +56,7 @@ export type input = struct {
};
// The requested module could not be found.
-export type module_not_found = !void;
+export type notfound = !void;
// We are unable to select from two ambiguous options for an input file.
export type ambiguous = !(str, str);
@@ -66,7 +66,7 @@ export type error = !(
fs::error |
io::error |
parse::error |
- module_not_found |
+ notfound |
ambiguous);
// Returns a human-friendly representation of an error.
@@ -80,7 +80,7 @@ export fn strerror(err: error) const str = {
return io::strerror(err);
case let err: parse::error =>
return parse::strerror(err);
- case module_not_found =>
+ case notfound =>
return "Module not found";
case let amb: ambiguous =>
return fmt::bsprintf(buf, "Cannot choose between {} and {}",