Commit 825f64be authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

rename Debug.nottest_flag to test_noflag

parent 3a6a512c
...@@ -177,7 +177,7 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ...@@ -177,7 +177,7 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0)
close_in cout; close_in cout;
fun () -> fun () ->
if Debug.nottest_flag debug then begin if Debug.test_noflag debug then begin
if cleanup then Sys.remove fin; if cleanup then Sys.remove fin;
if inplace then Sys.rename (save fin) fin; if inplace then Sys.rename (save fin) fin;
Sys.remove fout Sys.remove fout
......
...@@ -45,7 +45,7 @@ let flag_desc s = ...@@ -45,7 +45,7 @@ let flag_desc s =
try thd3 (Hashtbl.find flag_table s) with Not_found -> raise (UnknownFlag s) try thd3 (Hashtbl.find flag_table s) with Not_found -> raise (UnknownFlag s)
let test_flag s = !s let test_flag s = !s
let nottest_flag s = not !s let test_noflag s = not !s
let set_flag s = s := true let set_flag s = s := true
let unset_flag s = s := false let unset_flag s = s := false
......
...@@ -38,7 +38,7 @@ val toggle_flag : flag -> unit ...@@ -38,7 +38,7 @@ val toggle_flag : flag -> unit
(** Return the state of the flag *) (** Return the state of the flag *)
val test_flag : flag -> bool val test_flag : flag -> bool
val nottest_flag : flag -> bool val test_noflag : flag -> bool
val set_debug_formatter : Format.formatter -> unit val set_debug_formatter : Format.formatter -> unit
(** Set the formatter used when printing debug material *) (** Set the formatter used when printing debug material *)
......
...@@ -93,7 +93,7 @@ let rec print_ity_node inn fmt ity = match ity.ity_node with ...@@ -93,7 +93,7 @@ let rec print_ity_node inn fmt ity = match ity.ity_node with
(print_list space (print_ity_node true)) tl (print_list space (print_ity_node true)) tl
and print_regty fmt reg = and print_regty fmt reg =
if Debug.nottest_flag debug_print_reg_types then print_reg fmt reg else if Debug.test_noflag debug_print_reg_types then print_reg fmt reg else
fprintf fmt "@[%a:@,%a@]" print_reg reg (print_ity_node false) reg.reg_ity fprintf fmt "@[%a:@,%a@]" print_reg reg (print_ity_node false) reg.reg_ity
let print_ity = print_ity_node false let print_ity = print_ity_node false
......
...@@ -190,7 +190,7 @@ let unify_loc unify_fn loc x1 x2 = try unify_fn x1 x2 with ...@@ -190,7 +190,7 @@ let unify_loc unify_fn loc x1 x2 = try unify_fn x1 x2 with
| DTypeMismatch (dity1,dity2) -> errorm ~loc | DTypeMismatch (dity1,dity2) -> errorm ~loc
"This expression has type %a,@ but is expected to have type %a" "This expression has type %a,@ but is expected to have type %a"
Mlw_dty.print_dity dity2 Mlw_dty.print_dity dity1 Mlw_dty.print_dity dity2 Mlw_dty.print_dity dity1
| exn when Debug.nottest_flag Debug.stack_trace -> error ~loc exn | exn when Debug.test_noflag Debug.stack_trace -> error ~loc exn
let expected_type { de_loc = loc ; de_type = (argl,res) } dity = let expected_type { de_loc = loc ; de_type = (argl,res) } dity =
if argl <> [] then errorm ~loc "This expression is not a first-order value"; if argl <> [] then errorm ~loc "This expression is not a first-order value";
...@@ -1240,7 +1240,7 @@ and expr_fun lenv x gh bl (_, dsp as tr) = ...@@ -1240,7 +1240,7 @@ and expr_fun lenv x gh bl (_, dsp as tr) =
"variants are not allowed in a non-recursive definition"; "variants are not allowed in a non-recursive definition";
check_user_effect lenv lam.l_expr dsp; check_user_effect lenv lam.l_expr dsp;
let lam = let lam =
if Debug.nottest_flag implicit_post || dsp.ds_post <> [] || if Debug.test_noflag implicit_post || dsp.ds_post <> [] ||
oty_equal lam.l_spec.c_post.t_ty (Some ty_unit) then lam oty_equal lam.l_spec.c_post.t_ty (Some ty_unit) then lam
else match e_purify lam.l_expr with else match e_purify lam.l_expr with
| None -> lam | None -> lam
...@@ -1832,7 +1832,7 @@ let open_file, close_file = ...@@ -1832,7 +1832,7 @@ let open_file, close_file =
let lenv = Stack.create () in let lenv = Stack.create () in
let open_file lib path = let open_file lib path =
let env = Env.env_of_library lib in let env = Env.env_of_library lib in
let wp = path = [] && Debug.nottest_flag Typing.debug_type_only in let wp = path = [] && Debug.test_noflag Typing.debug_type_only in
Stack.push (Mstr.empty,Mstr.empty) lenv; Stack.push (Mstr.empty,Mstr.empty) lenv;
let open_theory id = Stack.push false inm; let open_theory id = Stack.push false inm;
Stack.push (Theory.create_theory ~path (Denv.create_user_id id)) tuc in Stack.push (Theory.create_theory ~path (Denv.create_user_id id)) tuc in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment