skip_thm_and_qed : bool;
}
+let debug = true
+
(* helpers ******************************************************************)
let split2_last l1 l2 =
let mk_convert st ?name sty ety note =
let e = Cn.hole "" in
let csty, cety = H.cic sty, H.cic ety in
- let _note = Printf.sprintf "%s\nSINTH: %s\nEXP: %s"
- note (Pp.ppterm csty) (Pp.ppterm cety)
+ let script =
+ if debug then
+ let sname = match name with None -> "" | Some (id, _) -> id in
+ let note = Printf.sprintf "%s: %s\nSINTH: %s\nEXP: %s"
+ note sname (Pp.ppterm csty) (Pp.ppterm cety)
+ in
+ [T.Note note]
+ else []
in
assert (Ut.is_sober csty);
assert (Ut.is_sober cety);
- if Ut.alpha_equivalence csty cety then [(* T.Note note *)] else
+ if Ut.alpha_equivalence csty cety then script else
let sty, ety = H.acic_bc st.context sty, H.acic_bc st.context ety in
match name with
- | None -> [T.Change (sty, ety, None, e, ""(*note*))]
+ | None -> T.Change (sty, ety, None, e, "") :: script
| Some (id, i) ->
begin match get_entry st id with
- | C.Def _ -> assert false (* [T.ClearBody (id, note)] *)
- | C.Decl _ -> [T.Change (ety, sty, Some (id, Some id), e, "" (* note *))]
+ | C.Def _ -> assert false (* T.ClearBody (id, "") :: script *)
+ | C.Decl _ ->
+ T.Change (ety, sty, Some (id, Some id), e, "") :: script
end
let convert st ?name v =
match get_inner_types st v with
- | None -> [(*T.Note "NORMAL: NO INNER TYPES"*)]
+ | None ->
+ if debug then [T.Note "NORMAL: NO INNER TYPES"] else []
| Some (sty, ety) -> mk_convert st ?name sty ety "NORMAL"
let convert_elim st ?name t v pattern =