| GRef_ (_, _, uri, _) -> Z.GRef uri
| Bind_ (a, l, w, t) -> Z.bind_abst a l w t
-let log1 s c t =
- let sc, st = s ^ " in the environment", "the term" in
- L.log ZO.specs level (L.et_items1 sc c st t)
+let log1 st s c t =
+ let s1, s2 = s ^ " in the environment", "the term" in
+ L.log st ZO.specs level (L.et_items1 s1 c s2 t)
-let log2 s cu u ct t =
+let log2 st s cu u ct t =
let s1, s2, s3 = s ^ " in the environment", "the term", "and in the environment" in
- L.log ZO.specs level (L.et_items2 s1 cu s2 u ~sc2:s3 ~c2:ct s2 t)
+ L.log st ZO.specs level (L.et_items2 s1 cu s2 u ~sc2:s3 ~c2:ct s2 t)
let empty_machine = {i = 0; c = Z.empty_lenv; s = []}
whd aux c m x
let ho_whd f st c t =
- if !G.trace >= level then log1 "Now scanning" c t;
+ if !G.trace >= level then log1 st.S.lenv "Now scanning" c t;
ho_whd f c empty_machine t
let rec are_convertible f st a c m1 t1 m2 t2 =
let rec aux m1 r1 m2 r2 =
(* L.warn "entering R.are_convertible_aux"; *)
let u, t = term_of_whdr r1, term_of_whdr r2 in
- if !G.trace >= level then log2 "Now really converting" c u c t;
+ if !G.trace >= level then log2 st.S.lenv "Now really converting" c u c t;
match r1, r2 with
| Sort_ h1, Sort_ h2 ->
if h1 = h2 then f a else f false
C.list_fold_left2 f map a m1.s m2.s
let are_convertible f st c u t =
- if !G.trace >= level then log2 "Now converting" c u c t;
+ if !G.trace >= level then log2 st.S.lenv "Now converting" c u c t;
are_convertible f st true c empty_machine u empty_machine t