]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/basic_ag/bagReduction.ml
- the disambiguation of unified binders continues
[helm.git] / helm / software / helena / src / basic_ag / bagReduction.ml
index 2f4b5a2c7e75af941bf2e9880625a53136a704f2..8df9274ed648a8611bd5d99f257ad76396a94ffe 100644 (file)
@@ -47,13 +47,13 @@ let term_of_whdr = function
    | 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 = []}
 
@@ -125,7 +125,7 @@ let rec ho_whd f c m x =
    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 =
@@ -133,7 +133,7 @@ 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 
@@ -190,5 +190,5 @@ and are_convertible_stacks f st a c m1 m2 =
       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