summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-27 15:55:36 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-27 15:55:36 -0700
commite83d16d5bd500b8e1913a836560f943a757ab86b (patch)
treeed88a93da5185122d16eec51086a053f0910b9a0 /lib/date
parent6121d28dc28103cb85b22fe404daaa8c441790b4 (diff)
downloadmc-e83d16d5bd500b8e1913a836560f943a757ab86b.tar.gz
Rename `std.Fail to `std.Err.
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/parse.myr2
-rw-r--r--lib/date/test/parse.myr8
-rw-r--r--lib/date/zoneinfo+posixy.myr2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/date/parse.myr b/lib/date/parse.myr
index 36eb479..80f0b76 100644
--- a/lib/date/parse.myr
+++ b/lib/date/parse.myr
@@ -53,7 +53,7 @@ const strparse = {f, s, tz, replace
d.actual -= (d.tzoff : std.time)
match err
- | `std.Some e: -> `std.Fail e
+ | `std.Some e: -> `std.Err e
| `std.None: /* no error, we're ok */
;;
diff --git a/lib/date/test/parse.myr b/lib/date/test/parse.myr
index a5ffe23..6bc7347 100644
--- a/lib/date/test/parse.myr
+++ b/lib/date/test/parse.myr
@@ -9,14 +9,14 @@ const main = {
| `std.Ok d:
std.assert(d.actual == 0, "got wrong date")
eq(std.bfmt(buf[:], "{D}", d), "1969-12-31 16:00:00 -0800")
- | `std.Fail m:
+ | `std.Err m:
std.fatal("failed to parse date: {}\n", m)
;;
match date.parsefmt("%Y-%m-%d", "1969 12 31")
| `std.Ok d:
std.fatal("should have errored")
- | `std.Fail m:
+ | `std.Err m:
eq(std.bfmt(buf[:], "{}", m), "expected separator '-', found ' '")
;;
@@ -25,7 +25,7 @@ const main = {
| `std.Ok d:
std.assert(d.actual == 0, "got wrong date")
eq(std.bfmt(buf[:], "{D}", d), "1970-1-01 00:00:00 +0000")
- | `std.Fail m:
+ | `std.Err m:
std.fatal("failed to parse date: {}\n", m)
;;
@@ -34,7 +34,7 @@ const main = {
| `std.Ok d:
std.assert(d.actual == -1173675600 * 1_000_000, "wrong timestamp")
eq(std.bfmt(buf[:], "{D}", d), "1932-10-23 00:00:00 +0500")
- | `std.Fail m:
+ | `std.Err m:
std.fatal("Failed to parse date: {}", m)
;;
}
diff --git a/lib/date/zoneinfo+posixy.myr b/lib/date/zoneinfo+posixy.myr
index 96b95ff..76cb025 100644
--- a/lib/date/zoneinfo+posixy.myr
+++ b/lib/date/zoneinfo+posixy.myr
@@ -81,7 +81,7 @@ const load = {file
/* check magic */
match std.slurp(file)
| `std.Ok d: p = d
- | `std.Fail m:
+ | `std.Err m:
-> std.zalloc()
;;