let map2 f = xlate_term f st lenv in
let g qid (a, _) =
let gref = D.TGRef ([], uri_of_qid qid) in
- match args with
- | [] -> f gref
- | args ->
+ match args, a with
+ | [], [] -> f gref
+ | _ ->
let f args = f (D.TAppl ([], args, gref)) in
let f args = f (List.rev_map (map2 C.start) args) in
let f a = C.list_rev_map_append f map1 a ~tail:args in
let f qid =
let ww = xlate_term C.start st lenv w in
H.add henv (uri_of_qid qid) cnt;
- let b = Y.Abst (D.TBind (a, D.Abst ws, ww)) in
+ let t = match ws with
+ | [] -> ww
+ | _ -> D.TBind (a, D.Abst ws, ww)
+ in
+(*
+ DrgOutput.pp_term print_string t; print_newline ();
+*)
+ let b = Y.Abst t in
let entity = [Y.Mark st.line], uri_of_qid qid, b in
f {st with line = succ st.line} entity
in
let ww = xlate_term C.start st lenv w in
let vv = xlate_term C.start st lenv v in
H.add henv (uri_of_qid qid) cnt;
- let b = Y.Abbr (D.TBind (a, D.Abst ws, D.TCast ([], ww, vv))) in
+ let t = match ws with
+ | [] -> D.TCast ([], ww, vv)
+ | _ -> D.TBind (a, D.Abst ws, D.TCast ([], ww, vv))
+ in
+(*
+ Printf.printf "%s\n" (U.string_of_uri (uri_of_qid qid));
+*)
+ let b = Y.Abbr t in
let a = Y.Mark st.line :: if trans then [] else [Y.Priv] in
let entity = a, uri_of_qid qid, b in
f {st with line = succ st.line} entity