aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--checker/values.ml2
-rw-r--r--checker/votour.ml9
2 files changed, 7 insertions, 4 deletions
diff --git a/checker/values.ml b/checker/values.ml
index 95befa287..a047c8005 100644
--- a/checker/values.ml
+++ b/checker/values.ml
@@ -70,7 +70,7 @@ let v_computation f =
Annot ("Future.computation",
v_ref
(v_sum "Future.comput" 0
- [| [| Fail "Ongoing" |]; [| f |] |]))
+ [| [| Fail "Future.ongoing" |]; [| f |] |]))
(** kernel/names *)
diff --git a/checker/votour.ml b/checker/votour.ml
index 3f82b638f..2634e8448 100644
--- a/checker/votour.ml
+++ b/checker/votour.ml
@@ -18,7 +18,7 @@ let to_dyn obj = (Obj.magic obj : dyn)
let rec get_name ?(extra=false) = function
|Any -> "?"
- |Fail _ -> assert false
+ |Fail s -> "Invalid node: "^s
|Tuple (name,_) -> name
|Sum (name,_,_) -> name
|Array v -> "array"^(if extra then "/"^get_name ~extra v else "")
@@ -89,7 +89,7 @@ let rec get_children v o pos = match v with
let t = to_dyn o in
let tpe = find_dyn t.dyn_tag in
[|(String, Obj.repr t.dyn_tag, 0 :: pos); (tpe, t.dyn_obj, 1 :: pos)|]
- |Fail _ -> assert false
+ |Fail s -> failwith "forbidden"
type info = {
nam : string;
@@ -131,7 +131,10 @@ let rec visit v o pos =
let v',o',pos' = children.(int_of_string l) in
push (get_name v) v o pos;
visit v' o' pos'
- with Failure _ | Invalid_argument _ -> visit v o pos
+ with
+ | Failure "empty stack" -> ()
+ | Failure "forbidden" -> let info = pop () in visit info.typ info.obj info.pos
+ | Failure _ | Invalid_argument _ -> visit v o pos
(** Loading the vo *)