summaryrefslogtreecommitdiff
path: root/lib/bio/test/bio-read.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio/test/bio-read.myr')
-rw-r--r--lib/bio/test/bio-read.myr11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bio/test/bio-read.myr b/lib/bio/test/bio-read.myr
index eafdb4a..2112d42 100644
--- a/lib/bio/test/bio-read.myr
+++ b/lib/bio/test/bio-read.myr
@@ -8,8 +8,8 @@ const main = {
var b
match bio.open("data/datafile", bio.Rd)
- | `std.Some bio: f = bio
- | `std.None: std.fatal(1, "Unable to open data file")
+ | `std.Ok bio: f = bio
+ | `std.Fail m: std.fatal("Unable to open data file: {}", m)
;;
/* read a 4 byte chunk j*/
@@ -40,7 +40,10 @@ const main = {
const r = {f, buf
match bio.read(f, buf)
- | `std.Some b: -> b
- | `std.None: std.put("eof\n")
+ | `std.Some b:
+ -> b
+ | `std.None:
+ std.put("eof\n")
+ -> ""
;;
}