summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-03-16 10:09:01 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-03-16 10:09:01 -0400
commite5e7bbaaae9cde0981c77e488a29e730876964ba (patch)
tree32012eb864854a36e74947956e1133ce84cd64a7 /tests
parenta00e028f21afd87ef9dd3ed143f52fe648275d45 (diff)
Undo an Especialize change that turned out to be unecessary
Diffstat (limited to 'tests')
-rw-r--r--tests/unpoly.ur28
-rw-r--r--tests/unpoly.urp2
-rw-r--r--tests/unpoly.urs1
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/unpoly.ur b/tests/unpoly.ur
new file mode 100644
index 00000000..706f3653
--- /dev/null
+++ b/tests/unpoly.ur
@@ -0,0 +1,28 @@
+val current = return (Some "1")
+fun resolve (_ : string) = return (Some "2")
+
+fun checkDeps deps =
+ u <- current;
+ List.foldlM (fn s (good, errs) =>
+ v' <- resolve s;
+ case v' of
+ None =>
+ return (False, <xml>
+ {errs}
+ Unknown library path <tt>{[s]}</tt>.<br/>
+ </xml>)
+ | Some v' =>
+ b <- return True;
+ if b then
+ return (good, errs)
+ else
+ return (False, <xml>
+ {errs}
+ Access denied to <tt>{[s]}</tt>.<br/>
+ </xml>)) (True, <xml/>) deps
+
+fun main () =
+ p <- checkDeps ("a" :: "b" :: []);
+ return <xml><body>
+ {p.2}
+ </body></xml>
diff --git a/tests/unpoly.urp b/tests/unpoly.urp
new file mode 100644
index 00000000..106bd20d
--- /dev/null
+++ b/tests/unpoly.urp
@@ -0,0 +1,2 @@
+$/list
+unpoly
diff --git a/tests/unpoly.urs b/tests/unpoly.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/unpoly.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page