comparison tests/unpoly.ur @ 1185:338be96f8533

Undo an Especialize change that turned out to be unecessary
author Adam Chlipala <adamc@hcoop.net>
date Tue, 16 Mar 2010 10:09:01 -0400
parents
children
comparison
equal deleted inserted replaced
1184:d6f0e972b706 1185:338be96f8533
1 val current = return (Some "1")
2 fun resolve (_ : string) = return (Some "2")
3
4 fun checkDeps deps =
5 u <- current;
6 List.foldlM (fn s (good, errs) =>
7 v' <- resolve s;
8 case v' of
9 None =>
10 return (False, <xml>
11 {errs}
12 Unknown library path <tt>{[s]}</tt>.<br/>
13 </xml>)
14 | Some v' =>
15 b <- return True;
16 if b then
17 return (good, errs)
18 else
19 return (False, <xml>
20 {errs}
21 Access denied to <tt>{[s]}</tt>.<br/>
22 </xml>)) (True, <xml/>) deps
23
24 fun main () =
25 p <- checkDeps ("a" :: "b" :: []);
26 return <xml><body>
27 {p.2}
28 </body></xml>