diff options
| author | Emilio Jesus Gallego Arias | 2019-01-27 17:25:46 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-01-27 17:25:46 +0100 |
| commit | c2031832ddcf1f631ef86cdb4c0dafeb9b742c79 (patch) | |
| tree | a393f15b9d59eb8ae19bba13058ed54dfd1d4770 /interp/constrextern.ml | |
| parent | 4b006833d6f866a33024e674d300f74592d24622 (diff) | |
| parent | 25014277624387ecba1befb60f1c54d68eadab01 (diff) | |
Merge PR #9214: Notations: Removing useless parentheses on abbreviations shortening a strict prefix of an application
Reviewed-by: ejgallego
Diffstat (limited to 'interp/constrextern.ml')
| -rw-r--r-- | interp/constrextern.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index 444ac5ab6d..13078840ef 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -625,8 +625,13 @@ let explicitize inctx impl (cf,f) args = CApp ((ip,f),args1@args2) | None -> let args = exprec 1 (args,impl) in - if List.is_empty args then f.CAst.v else CApp ((None, f), args) - in + if List.is_empty args then f.CAst.v else + match f.CAst.v with + | CApp (g,args') -> + (* may happen with notations for a prefix of an n-ary + application *) + CApp (g,args'@args) + | _ -> CApp ((None, f), args) in try expl () with Expl -> let f',us = match f with { CAst.v = CRef (f,us) } -> f,us | _ -> assert false in |
