diff options
| author | herbelin | 2009-02-06 10:48:02 +0000 |
|---|---|---|
| committer | herbelin | 2009-02-06 10:48:02 +0000 |
| commit | 97c2b41003076b099668430ca69df09a6c53f8c9 (patch) | |
| tree | e26bed1dfda5f22101c8cae6133e314ac6452c02 /interp | |
| parent | 5ad9c7361fd63728623a1c8f9eab5e134d4025b3 (diff) | |
Fixing #2044 (bad printing of primitive notation at the head of
coercion to funclass) [added a new notation output test as the
initial one is quite saturated in miscellaneous notations].
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11886 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
| -rw-r--r-- | interp/constrextern.ml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index 237ffb55b8..91a9eeefaf 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -555,9 +555,16 @@ let rec remove_coercions inctx = function let l = list_skipn n args in let (a,l) = match l with a::l -> (a,l) | [] -> assert false in (* Recursively remove the head coercions *) - (match remove_coercions true a with - | RApp (_,a,l') -> RApp (loc,a,l'@l) - | a -> RApp (loc,a,l)) + let a' = remove_coercions true a in + (* Don't flatten App's in case of funclass so that + (atomic) notations on [a] work; should be compatible + since printer does not care whether App's are + collapsed or not and notations with an implicit + coercion using funclass either would have already + been confused with ordinary application or would have need + a surrounding context and the coercion to funclass would + have been made explicit to match *) + if l = [] then a' else RApp (loc,a',l) | _ -> c with Not_found -> c) | c -> c |
