diff options
| author | Hugo Herbelin | 2016-07-18 23:40:43 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2016-07-19 11:45:35 +0200 |
| commit | b3e7ef09210267e6d34bc1ac377e66c7fec7e739 (patch) | |
| tree | e97d704efb1246bbf076a7b5678457f4ec4e0895 | |
| parent | 692e33acd9a44d5c00fe515bd9b87728d2c872a7 (diff) | |
Fixing missing parentheses in printing of patterns in binders.
(In agreement with Daniel.)
| -rw-r--r-- | printing/ppconstr.ml | 4 | ||||
| -rw-r--r-- | test-suite/output/PatternsInBinders.out | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index 252b0967dc..be92372aca 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -549,7 +549,7 @@ end) = struct not (Id.Set.mem n (Topconstr.free_vars_of_constr_expr a)) -> return ( hov 0 ( - keyword "forall" ++ spc () ++ str "'" ++ pr_patt ltop p ++ + keyword "forall" ++ spc () ++ str "'" ++ pr_patt lsimplepatt p ++ str "," ++ pr spc ltop a), llambda ) @@ -573,7 +573,7 @@ end) = struct not (Id.Set.mem n (Topconstr.free_vars_of_constr_expr a)) -> return ( hov 0 ( - keyword "fun" ++ spc () ++ str "'" ++ pr_patt ltop p ++ + keyword "fun" ++ spc () ++ str "'" ++ pr_patt lsimplepatt p ++ pr_fun_sep ++ pr spc ltop a), llambda ) diff --git a/test-suite/output/PatternsInBinders.out b/test-suite/output/PatternsInBinders.out index 6a28475d7b..5f9ea9e3d6 100644 --- a/test-suite/output/PatternsInBinders.out +++ b/test-suite/output/PatternsInBinders.out @@ -4,12 +4,12 @@ fun '(x, y) => (y, x) : A * B -> B * A forall '(x, y), swap (x, y) = (y, x) : Prop -proj_informative = fun 'exist _ x _ => x : A +proj_informative = fun '(exist _ x _) => x : A : {x : A | P x} -> A -foo = fun 'Bar n b tt p => if b then n + p else n - p +foo = fun '(Bar n b tt p) => if b then n + p else n - p : Foo -> nat baz = -fun 'Bar n1 _ tt p1 => fun 'Bar _ _ tt _ => n1 + p1 +fun '(Bar n1 _ tt p1) => fun '(Bar _ _ tt _) => n1 + p1 : Foo -> Foo -> nat λ '(x, y), (y, x) : A * B → B * A |
