summaryrefslogtreecommitdiff
path: root/lib/fileutil/loopcheck+plan9.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-10-29 19:08:13 -0700
committerOri Bernstein <ori@eigenstate.org>2017-10-29 19:08:13 -0700
commit269e4f69372bc1250dcb70a9dfde30486809f1b0 (patch)
treeeb86ec1c691bf8f479be36ede67e029f55f3c09c /lib/fileutil/loopcheck+plan9.myr
parent4eea6de57c9fce0a69f85270303baae069c3e237 (diff)
parentd359a98ab9cfc42de66ad35333bd6d6c0571b7ca (diff)
downloadmc-qbe.tar.gz
Merge branch 'master' into qbeqbe
Diffstat (limited to 'lib/fileutil/loopcheck+plan9.myr')
-rw-r--r--lib/fileutil/loopcheck+plan9.myr21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/fileutil/loopcheck+plan9.myr b/lib/fileutil/loopcheck+plan9.myr
new file mode 100644
index 0000000..9b5584b
--- /dev/null
+++ b/lib/fileutil/loopcheck+plan9.myr
@@ -0,0 +1,21 @@
+use std
+
+/* plan 9 can't have directory loops, by construction, so this is nops */
+pkg fileutil =
+ type loopcheck = void
+
+ const mkloopcheck : (cwd : byte[:] -> loopcheck)
+ const freeloopcheck : (l : loopcheck -> void)
+ const looped : (l : loopcheck, p : byte[:] -> bool)
+;;
+
+const mkloopcheck = {cwd
+ -> (void : loopcheck)
+}
+
+const freeloopcheck = {l
+}
+
+const looped = {l, p
+ -> false
+}