adamc@1185: val current = return (Some "1")
adamc@1185: fun resolve (_ : string) = return (Some "2")
adamc@1185:
adamc@1185: fun checkDeps deps =
adamc@1185: u <- current;
adamc@1185: List.foldlM (fn s (good, errs) =>
adamc@1185: v' <- resolve s;
adamc@1185: case v' of
adamc@1185: None =>
adamc@1185: return (False,
adamc@1185: {errs}
adamc@1185: Unknown library path {[s]}.
adamc@1185: )
adamc@1185: | Some v' =>
adamc@1185: b <- return True;
adamc@1185: if b then
adamc@1185: return (good, errs)
adamc@1185: else
adamc@1185: return (False,
adamc@1185: {errs}
adamc@1185: Access denied to {[s]}.
adamc@1185: )) (True, ) deps
adamc@1185:
adamc@1185: fun main () =
adamc@1185: p <- checkDeps ("a" :: "b" :: []);
adamc@1185: return
adamc@1185: {p.2}
adamc@1185: