X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Fbasic_rg%2FbrgGrafite.ml;fp=helm%2Fsoftware%2Fhelena%2Fsrc%2Fbasic_rg%2FbrgGrafite.ml;h=b3721e0ee5d2b942e6616dfde8cbd4d0d1387282;hb=fec20705af4705f8eb9542aece87769b82a6a6b4;hp=6aa4ac34d75274dc236f4b6c4474d3ba07d68c32;hpb=b37863d4598516a06241f18ad0db963399015bf2;p=helm.git diff --git a/helm/software/helena/src/basic_rg/brgGrafite.ml b/helm/software/helena/src/basic_rg/brgGrafite.ml index 6aa4ac34d..b3721e0ee 100644 --- a/helm/software/helena/src/basic_rg/brgGrafite.ml +++ b/helm/software/helena/src/basic_rg/brgGrafite.ml @@ -72,38 +72,38 @@ let out_name och a = E.name err f a let rec out_term st p e och = function - | B.Sort (_, h) -> - let sort = if h = 0 then "Type[0]" else if h = 1 then "Prop" else assert false in + | B.Sort k -> + let sort = if k = 0 then "Type[0]" else if k = 1 then "Prop" else assert false in KP.fprintf och "%s" sort | B.LRef (_, i) -> - let _, _, a, b = B.get e i in - KP.fprintf och "%a" out_name a + let _, _, _, y, b = B.get e i in + KP.fprintf och "%a" out_name y | B.GRef (_, s) -> KP.fprintf och "%a" out_uri s - | B.Cast (_, u, t) -> + | B.Cast (u, t) -> KP.fprintf och "(%a : %a)" (out_term st false e) t (out_term st false e) u - | B.Appl (_, _, v, t) -> + | B.Appl (_, v, t) -> let pt = match t with B.Appl _ -> false | _ -> true in let op, cp = if p then "(", ")" else "", "" in KP.fprintf och "%s%a %a%s" op (out_term st pt e) t (out_term st true e) v cp - | B.Bind (a, B.Abst (r, n, w), t) -> + | B.Bind (y, B.Abst (r, n, w), t) -> let op, cp = if p then "(", ")" else "", "" in - let a = R.alpha B.mem e a in - let ee = B.push e B.empty a (B.abst r n w) in - let binder = match N.to_string st n, fst a.E.n_main with + let y = R.alpha B.mem e y in + let ee = B.push e B.empty E.empty_node y (B.abst r n w) in + let binder = match N.to_string st n, fst y.E.b_main with | "1", 0 -> "Π" | "1", 1 -> "∀" | "2", _ -> "λ" | _ -> ok := false; "?" in KP.fprintf och "%s%s%a:%a.%a%s" - op binder out_name a (out_term st false e) w (out_term st false ee) t cp - | B.Bind (a, B.Abbr v, t) -> + op binder out_name y (out_term st false e) w (out_term st false ee) t cp + | B.Bind (y, B.Abbr v, t) -> let op, cp = if p then "(", ")" else "", "" in - let a = R.alpha B.mem e a in - let ee = B.push e B.empty a (B.abbr v) in + let y = R.alpha B.mem e y in + let ee = B.push e B.empty E.empty_node y (B.abbr v) in KP.fprintf och "%slet %a ≝ %a in %a%s" - op out_name a (out_term st false e) v (out_term st false ee) t cp + op out_name y (out_term st false e) v (out_term st false ee) t cp | B.Bind (a, B.Void, t) -> C.err () let close_out och () = close_out och