From 7d497e25f19022aa7f697cffb353f9f6776e822e Mon Sep 17 00:00:00 2001 From: herbelin Date: Thu, 31 Mar 2011 18:58:17 +0000 Subject: Did that adding a rule for printing applications as "f(x)" works. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13946 85f007b7-540e-0410-9357-904b9bb8a0f7 --- interp/constrextern.ml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'interp/constrextern.ml') diff --git a/interp/constrextern.ml b/interp/constrextern.ml index fa0e189153..08db24dbaa 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -747,16 +747,22 @@ and extern_symbol (tmp_scope,scopes as allscopes) vars t = function try (* Adjusts to the number of arguments expected by the notation *) let (t,args,argsscopes,argsimpls) = match t,n with - | GApp (_,(GRef (_,ref) as f),args), Some n + | GApp (_,f,args), Some n when List.length args >= n -> let args1, args2 = list_chop n args in - let subscopes = - try list_skipn n (find_arguments_scope ref) with _ -> [] in - let impls = - let impls = - select_impargs_size - (List.length args) (implicits_of_global ref) in - try list_skipn n impls with _ -> [] in + let subscopes, impls = + match f with + | GRef (_,ref) -> + let subscopes = + try list_skipn n (find_arguments_scope ref) with _ -> [] in + let impls = + let impls = + select_impargs_size + (List.length args) (implicits_of_global ref) in + try list_skipn n impls with _ -> [] in + subscopes,impls + | _ -> + [], [] in (if n = 0 then f else GApp (dummy_loc,f,args1)), args2, subscopes, impls | GApp (_,(GRef (_,ref) as f),args), None -> -- cgit v1.2.3