| 0 -> []
| _ -> (Cic.Rel (howmany + from)) :: (mk_rels (howmany-1) from)
-let profiling_enabled = false
+let profiling_enabled = true
+type profiler = { profile : 'a 'b. ('a -> 'b) -> 'a -> 'b }
let profile =
if profiling_enabled then
function s ->
(fun () ->
print_endline
("!! TOTAL TIME SPENT IN " ^ s ^ ": " ^ string_of_float !total));
- profile
+ { profile = profile }
else
- function _ -> fun f x -> f x
+ function _ -> { profile = fun f x -> f x }
let id_of_annterm =
function
(** profile s
* returns a profiling function; [s] is used for labelling the total time at
the end of the execution *)
-val profile : string -> ('a -> 'b) -> 'a -> 'b
+type profiler = { profile : 'a 'b. ('a -> 'b) -> 'a -> 'b }
+val profile : string -> profiler