let disambiguate_pattern status_ref (wanted, hyp_paths, goal_path) =
let interp path = Disambiguate.interpretate_path [] path in
- let goal_path = interp goal_path in
+ let goal_path = HExtlib.map_option interp goal_path in
let hyp_paths = List.map (fun (name, path) -> name, interp path) hyp_paths in
let wanted =
match wanted with
let wanted = disambiguate_lazy_term status_ref wanted in
Some wanted
in
- (wanted, hyp_paths ,goal_path)
+ (wanted, hyp_paths, goal_path)
let disambiguate_reduction_kind aliases_ref = function
| `Unfold (Some t) ->
let disambiguate_command status =
function
| GrafiteAst.Alias _
+ | GrafiteAst.Coercion _
| GrafiteAst.Default _
| GrafiteAst.Drop _
| GrafiteAst.Dump _
| GrafiteAst.Render _
| GrafiteAst.Set _ as cmd ->
status,cmd
- | GrafiteAst.Coercion (loc, term, add_composites) ->
- let status_ref = ref status in
- let term = disambiguate_term ~context:[] status_ref ~-1 term in
- !status_ref, GrafiteAst.Coercion (loc,term,add_composites)
| GrafiteAst.Obj (loc,obj) ->
let status,obj = disambiguate_obj status obj in
status, GrafiteAst.Obj (loc,obj)
+
goal_path = OPT [ SYMBOL <:unicode<vdash>>; term = tactic_term -> term ] ->
let goal_path =
match goal_path, hyp_paths with
- None, [] -> Ast.UserInput
- | None, _::_ -> Ast.Implicit
- | Some goal_path, _ -> goal_path
+ None, [] -> Some Ast.UserInput
+ | None, _::_ -> None
+ | Some goal_path, _ -> Some goal_path
in
hyp_paths,goal_path
]
] ->
let wanted,hyp_paths,goal_path =
match wanted_and_sps with
- wanted,None -> wanted, [], Ast.UserInput
+ wanted,None -> wanted, [], Some Ast.UserInput
| wanted,Some (hyp_paths,goal_path) -> wanted,hyp_paths,goal_path
in
wanted, hyp_paths, goal_path ] ->
match res with
- None -> None,[],Ast.UserInput
+ None -> None,[],Some Ast.UserInput
| Some ps -> ps]
];
direction: [
ind_types
in
GrafiteAst.Obj (loc, Ast.Inductive (params, ind_types))
- | IDENT "coercion" ; name = IDENT ->
- GrafiteAst.Coercion (loc, Ast.Ident (name,Some []), true)
- | IDENT "coercion" ; name = URI ->
- GrafiteAst.Coercion (loc, Ast.Uri (name,Some []), true)
+ | IDENT "coercion" ; suri = URI ->
+ GrafiteAst.Coercion (loc, UriManager.uri_of_string suri, true)
| IDENT "alias" ; spec = alias_spec ->
GrafiteAst.Alias (loc, spec)
| IDENT "record" ; (params,name,ty,fields) = record_spec ->