summaryrefslogtreecommitdiffstats
path: root/camlp4/Camlp4/Printers
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2006-06-29 21:51:42 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2006-06-29 21:51:42 +0000
commit4e509164a91f5eba2227a1cf595e3a1dcd24806d (patch)
treec93cd35bed59920bc2522817a160d6a9c845e3de /camlp4/Camlp4/Printers
parentbf3900f07bd8b2a0b1c706f1750301db4a6235a0 (diff)
Resurect FOLD[01], fix few bugs, speed up assoc, add a Null printer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7457 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/Camlp4/Printers')
-rw-r--r--camlp4/Camlp4/Printers/OCaml.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/camlp4/Camlp4/Printers/OCaml.ml b/camlp4/Camlp4/Printers/OCaml.ml
index 74d7b5810..b94cf57ff 100644
--- a/camlp4/Camlp4/Printers/OCaml.ml
+++ b/camlp4/Camlp4/Printers/OCaml.ml
@@ -682,6 +682,8 @@ module Make (Syntax : Sig.Camlp4Syntax.S) = struct
| <:ctyp< +'$s$ >> -> pp f "+'%a" o#var s
| <:ctyp< -'$s$ >> -> pp f "-'%a" o#var s
| <:ctyp< $t1$ | $t2$ >> -> pp f "%a@ | %a" o#ctyp t1 o#ctyp t2
+ | <:ctyp< $t1$ : mutable $t2$ >> ->
+ pp f "@[mutable@ %a :@ %a@]" o#ctyp t1 o#ctyp t2
| <:ctyp< $t1$ : $t2$ >> -> pp f "@[<2>%a :@ %a@]" o#ctyp t1 o#ctyp t2
| <:ctyp< $t1$; $t2$ >> -> pp f "%a;@ %a" o#ctyp t1 o#ctyp t2
| <:ctyp< $t1$ of $t2$ >> ->
@@ -718,10 +720,9 @@ module Make (Syntax : Sig.Camlp4Syntax.S) = struct
[ <:ctyp@loc< $t1$ and $t2$ >> ->
let () = o#node f t (fun _ -> loc) in
pp f "%a@ * %a" o#constructor_type t1 o#constructor_type t2
+ | <:ctyp< $_$ -> $_$ >> -> pp f "(%a)" o#ctyp t
| t -> o#ctyp f t ];
- (* <:ctyp< $lid:s$ : mutable $t$ >> -> pp f "@[mutable@ %a :@ %a@]" o#var s o#ctyp t *)
- (* | <:ctyp< $lid:s$ : $t$ >> -> pp f "@[%a%a :@ %a@]" o#var s o#ctyp t *)
method sig_item f sg =
let () = o#node f sg Ast.loc_of_sig_item in