diff options
-rw-r--r-- | camlp4/etc/pr_o.ml | 8 | ||||
-rw-r--r-- | camlp4/etc/pr_r.ml | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/camlp4/etc/pr_o.ml b/camlp4/etc/pr_o.ml index d32bd4304..385f16918 100644 --- a/camlp4/etc/pr_o.ml +++ b/camlp4/etc/pr_o.ml @@ -681,7 +681,11 @@ and class_type_parameters (loc, tpl) = and type_parameter tp dg k = HVbox [: `S LO "'"; `S LR (fst tp); k :] and class_expr ce k = match ce with - [ MLast.CeLet _ rf lb ce -> + [ MLast.CeFun _ p ce -> + HVbox + [: `S LR "fun"; `simple_patt p "" [: `S LR "->" :]; + `class_expr ce k :] + | MLast.CeLet _ rf lb ce -> HVbox [: `HVbox [: :]; `bind_list [: `S LR "let"; rec_flag rf :] lb "" [: `S LR "in" :]; @@ -706,6 +710,8 @@ and class_expr2 ce k = HVbox [: `S LO "("; `class_expr ce [: `S LR ":" :]; `class_type ct [: `S RO ")"; k :] :] + | MLast.CeFun _ _ _ -> + HVbox [: `S LO "("; `class_expr ce [: `S RO ")"; k :] :] | _ -> HVbox [: `not_impl "class_expr" ce; k :] ] and class_structure b cf k = BEbox diff --git a/camlp4/etc/pr_r.ml b/camlp4/etc/pr_r.ml index 77488fbee..d032b6175 100644 --- a/camlp4/etc/pr_r.ml +++ b/camlp4/etc/pr_r.ml @@ -671,7 +671,10 @@ and class_type_parameters (loc, tpl) = and type_parameter tp k = HVbox [: `S LO "'"; `S LR (fst tp); k :] and class_expr ce k = match ce with - [ MLast.CeLet _ rf lb ce -> + [ MLast.CeFun _ p ce -> + HVbox + [: `S LR "fun"; `simple_patt p [: `S LR "->" :]; `class_expr ce k :] + | MLast.CeLet _ rf lb ce -> HVbox [: `HVbox [: :]; `bind_list [: `S LR "let"; flag "rec" rf :] lb [: `S LR "in" :]; @@ -696,6 +699,8 @@ and class_expr2 ce k = HVbox [: `S LO "("; `class_expr ce [: `S LR ":" :]; `class_type ct [: `S RO ")"; k :] :] + | MLast.CeFun _ _ _ -> + HVbox [: `S LO "("; `class_expr ce [: `S RO ")"; k :] :] | _ -> HVbox [: `not_impl "class_expr" ce; k :] ] and simple_expr e k = match e with |