+ | GrafiteAst.NCoercion (loc, name, compose, None) ->
+ let status, t, ty, source, target =
+ let o_t = NotationPt.Ident (name,None) in
+ let metasenv,subst, status,t =
+ GrafiteDisambiguate.disambiguate_nterm
+ status `XTNone [] [] [] ("",0,o_t) in
+ assert( metasenv = [] && subst = []);
+ let ty = NCicTypeChecker.typeof status [] [] [] t in
+ let source, target =
+ let clean = function
+ | NCic.Appl (NCic.Const _ as r :: l) ->
+ NotationPt.Appl (NotationPt.NCic r ::
+ List.map (fun _ -> NotationPt.Implicit `JustOne)l)
+ | NCic.Const _ as r -> NotationPt.NCic r
+ | NCic.Sort _ as r -> NotationPt.NCic r (* FG: missing case *)
+ | _ -> assert false
+ in
+ let rec aux = function
+ | NCic.Prod (_,_, (NCic.Prod _ as rest)) -> aux rest
+ | NCic.Prod (name, src, tgt) -> (name, clean src), clean tgt
+ | _ -> assert false
+ in
+ aux ty
+ in
+ status, o_t, NotationPt.NCic ty, source, target
+ in
+ let cmd =
+ GrafiteAst.NCoercion (loc, name, compose, Some (t, ty, source, target))
+ in
+ eval_ncommand ~include_paths opts status (text,prefix_len,cmd)
+ | GrafiteAst.NCoercion (loc, name, compose, Some (t, ty, source, target)) ->