summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Turner <iitalics@gmail.com>2017-09-16 13:02:20 -0400
committerOri Bernstein <ori@eigenstate.org>2017-09-16 13:38:25 -0700
commit95a93936f420dd480454eb97c25b02874da7a966 (patch)
tree6265a30bf3dba651ae50e2a7df185b75265be2a8
parent943c865bcfacb00af4c681fc36fbcab2b7f9a55f (diff)
downloadmc-95a93936f420dd480454eb97c25b02874da7a966.tar.gz
fix some docs that were broken by renaming
-rw-r--r--README.md2
-rw-r--r--lib/regex/myr-regex.39
2 files changed, 6 insertions, 5 deletions
diff --git a/README.md b/README.md
index 578f96f..3b0ba9c 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@ const main = {
str = "match against this!"
match regex.compile(".*")
| `std.Ok r: re = r
- | `std.Fail m: std.fatal("couldn't compile regex: {}\n", m)
+ | `std.Err m: std.fatal("couldn't compile regex: {}\n", m)
;;
match regex.exec(re, str)
| `std.Some _: std.put("regex matched\n")
diff --git a/lib/regex/myr-regex.3 b/lib/regex/myr-regex.3
index 6e8f018..46bb998 100644
--- a/lib/regex/myr-regex.3
+++ b/lib/regex/myr-regex.3
@@ -167,17 +167,18 @@ Space separator unicode property
use regex
const main = {
- match regex.compile(pat)
var i
- | `std.Success re:
+
+ match regex.compile(pat)
+ | `std.Ok re:
match regex.exec(re, text)
| `std.Some matches:
for i = 0; i < matches.len; i++
- std.put("Match %i: %s\n", i, match[i])
+ std.put("Match {}: {}\n", i, matches[i])
;;
| `std.None: std.put("Text did not match\n")
;;
- | `std.Failure err:
+ | `std.Err err:
std.put("failed to compile regex")
;;
}