aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/future.ml3
-rw-r--r--lib/future.mli7
-rw-r--r--lib/system.ml8
3 files changed, 7 insertions, 11 deletions
diff --git a/lib/future.ml b/lib/future.ml
index 01fb7d0297..d3ea538549 100644
--- a/lib/future.ml
+++ b/lib/future.ml
@@ -98,7 +98,6 @@ let peek_val kx = let _, _, _, x = get kx in match !x with
let uuid kx = let _, id, _, _ = get kx in id
let from_val ?(fix_exn=id) v = create fix_exn (Val v)
-let from_here ?(fix_exn=id) v = create fix_exn (Val v)
let fix_exn_of ck = let _, _, fix_exn, _ = get ck in fix_exn
@@ -168,8 +167,6 @@ let join kx =
kx := Finished v;
v
-let sink kx = if is_val kx then ignore(join kx)
-
let split2 x =
chain x (fun x -> fst x), chain x (fun x -> snd x)
diff --git a/lib/future.mli b/lib/future.mli
index 8e5f704837..c0fc91bcc3 100644
--- a/lib/future.mli
+++ b/lib/future.mli
@@ -55,10 +55,6 @@ val create : fix_exn -> (unit -> 'a) -> 'a computation
argument should really be given *)
val from_val : ?fix_exn:fix_exn -> 'a -> 'a computation
-(* Like from_val, but also takes a snapshot of the global state. Morally
- the value is not just the 'a but also the global system state *)
-val from_here : ?fix_exn:fix_exn -> 'a -> 'a computation
-
(* To get the fix_exn of a computation and build a Lemmas.declaration_hook.
* When a future enters the environment a corresponding hook is run to perform
* some work. If this fails, then its failure has to be annotated with the
@@ -100,9 +96,6 @@ val compute : 'a computation -> 'a value
* in a computation obtained by chaining on a joined future. *)
val join : 'a computation -> 'a
-(* Call this before stocking the future. If it is_val then it is joined *)
-val sink : 'a computation -> unit
-
(*** Utility functions ************************************************* ***)
val split2 :
('a * 'b) computation -> 'a computation * 'b computation
diff --git a/lib/system.ml b/lib/system.ml
index 46b358f825..b1a9efccfc 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -53,8 +53,14 @@ module StrSet = Set.Make(StrMod)
let dirmap = ref StrMap.empty
let make_dir_table dir =
+ let entries =
+ try
+ Sys.readdir dir
+ with Sys_error _ ->
+ warn_cannot_open_dir dir;
+ [||] in
let filter_dotfiles s f = if f.[0] = '.' then s else StrSet.add f s in
- Array.fold_left filter_dotfiles StrSet.empty (Sys.readdir dir)
+ Array.fold_left filter_dotfiles StrSet.empty entries
(** Don't trust in interactive mode (the default) *)
let trust_file_cache = ref false