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,
{errs}
Unknown library path {[s]}.
)
| Some v' =>
b <- return True;
if b then
return (good, errs)
else
return (False,
{errs}
Access denied to {[s]}.
)) (True, ) deps
fun main () =
p <- checkDeps ("a" :: "b" :: []);
return
{p.2}