diff options
author | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-10-02 13:24:47 +0000 |
---|---|---|
committer | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-10-02 13:24:47 +0000 |
commit | 9fca710b037a197e2e339ba59aef6bf07963f2be (patch) | |
tree | 9c05a2e9c3e9036b990f9f1016305514a31c7efb | |
parent | 02863d1495eee0d8bdf4925f648d703266f166f5 (diff) |
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3829 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-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 |