summaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/fltparse.myr8
-rw-r--r--lib/std/readall.myr2
-rw-r--r--lib/std/syswrap+posixy.myr2
-rw-r--r--lib/std/test/search.myr4
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/std/fltparse.myr b/lib/std/fltparse.myr
index ff9a053..fcc97af 100644
--- a/lib/std/fltparse.myr
+++ b/lib/std/fltparse.myr
@@ -27,8 +27,8 @@ const flt64parse = {str
match fltparse(str)
| `Badflt: -> `std.None
- | `Inf sign: -> `std.Some (sign : flt64) * std.flt64inf()
- | `Nan sign: -> `std.Some (sign : flt64) * std.flt64nan()
+ | `Inf sign: -> `std.Some ((sign : flt64) * std.flt64inf())
+ | `Nan sign: -> `std.Some ((sign : flt64) * std.flt64nan())
| `Flt (sign, mant, exp):
val = toflt(sign, mant, exp, &lim64)
std.bigfree(mant)
@@ -41,8 +41,8 @@ const flt32parse = {str
match fltparse(str)
| `Badflt: -> `std.None
- | `Inf sign: -> `std.Some (sign : flt32) * std.flt32inf()
- | `Nan sign: -> `std.Some (sign : flt32) * std.flt32nan()
+ | `Inf sign: -> `std.Some ((sign : flt32) * std.flt32inf())
+ | `Nan sign: -> `std.Some ((sign : flt32) * std.flt32nan())
| `Flt (sign, mant, exp):
val = toflt(sign, mant, exp, &lim32)
std.bigfree(mant)
diff --git a/lib/std/readall.myr b/lib/std/readall.myr
index 68c930e..4f7d1da 100644
--- a/lib/std/readall.myr
+++ b/lib/std/readall.myr
@@ -22,5 +22,5 @@ const readall = {fd, dst
-> `Err e
;;
;;
- -> `Ok sz - dst.len
+ -> `Ok (sz - dst.len)
}
diff --git a/lib/std/syswrap+posixy.myr b/lib/std/syswrap+posixy.myr
index 2e8474d..e930e0f 100644
--- a/lib/std/syswrap+posixy.myr
+++ b/lib/std/syswrap+posixy.myr
@@ -156,7 +156,7 @@ const fmtime = {path
if r >= 0
sec = (sb.mtime.sec : time)
nsec = (sb.mtime.nsec : time)
- -> `Ok sec*1000 + nsec/1_000_000
+ -> `Ok (sec*1000 + nsec/1_000_000)
else
-> check(r)
;;
diff --git a/lib/std/test/search.myr b/lib/std/test/search.myr
index eea3680..31e1e63 100644
--- a/lib/std/test/search.myr
+++ b/lib/std/test/search.myr
@@ -5,13 +5,13 @@ const sl = [1, 3, 5, 8, 9, 33]
const main = {
expect(std.lsearch(sl[:], 1, std.numcmp), `std.Some 0)
- expect(std.lsearch(sl[:], 33, std.numcmp), `std.Some sl.len - 1)
+ expect(std.lsearch(sl[:], 33, std.numcmp), `std.Some (sl.len - 1))
expect(std.lsearch(sl[:], 5, std.numcmp), `std.Some 2)
expect(std.lsearch(sl[:], 6, std.numcmp), `std.None)
expect(std.lsearch(sl[:0], 6, std.numcmp), `std.None)
expect(std.bsearch(sl[:], 1, std.numcmp), `std.Some 0)
- expect(std.bsearch(sl[:], 33, std.numcmp), `std.Some sl.len - 1)
+ expect(std.bsearch(sl[:], 33, std.numcmp), `std.Some (sl.len - 1))
expect(std.bsearch(sl[:], 5, std.numcmp), `std.Some 2)
expect(std.bsearch(sl[:], 6, std.numcmp), `std.None)
expect(std.bsearch(sl[:0], 1, std.numcmp), `std.None) /* empty slice */