commit 9bb19b7d7149308109990080f0ad788905bddeee
parent a0ec9f13fd6aebe8d5ac936431aabc5b49d9333e
Author: Sebastian <sebastian@sebsite.pw>
Date: Tue, 1 Mar 2022 17:17:49 -0500
haredoc: remove unnecessary error types
These types weren't properly declared as error types, were unused, and
duplicated standard library functionality.
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/cmd/haredoc/errors.ha b/cmd/haredoc/errors.ha
@@ -5,9 +5,7 @@ use hare::lex;
use hare::parse;
use io;
-type eof = void;
-type syntaxerr = void;
-type error = !(lex::error | parse::error | io::error | syntaxerr | eof);
+type error = !(lex::error | parse::error | io::error);
fn strerror(err: error) str = {
match (err) {
@@ -17,9 +15,5 @@ fn strerror(err: error) str = {
return parse::strerror(err);
case let err: io::error =>
return io::strerror(err);
- case eof =>
- return "Unexpected EOF";
- case syntaxerr =>
- return "Syntax error";
};
};