diff options
| author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2010-05-11 13:34:38 +0000 |
|---|---|---|
| committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2010-05-11 13:34:38 +0000 |
| commit | b8cef86ba3d8a926de901c15c282955cde9f6b1a (patch) | |
| tree | 918e6aca3825380d41a1694b15fc0cbbc59d8b21 | |
| parent | 0d72001f2ad6c686799b3391f71ef47f92aa9549 (diff) | |
| download | ocaml-b8cef86ba3d8a926de901c15c282955cde9f6b1a.tar.gz | |
Merge remote branch 'ocaml-git/buildsys' into trunk
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10387 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
| -rw-r--r-- | camlp4/boot/Camlp4.ml | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/camlp4/boot/Camlp4.ml b/camlp4/boot/Camlp4.ml index b2ae399feb..6d948e5aea 100644 --- a/camlp4/boot/Camlp4.ml +++ b/camlp4/boot/Camlp4.ml @@ -640,7 +640,7 @@ module Sig = (** {6 Traversals} *) (** This class is the base class for map traversal on the Ast. To make a custom traversal class one just extend it like that: - + This example swap pairs expression contents: open Camlp4.PreCast; [class swap = object @@ -13890,7 +13890,8 @@ module Struct = error loc "range pattern allowed only for characters") | PaRec (loc, p) -> mkpat loc - (Ppat_record (List.map mklabpat (list_of_patt p []), Closed)) + (Ppat_record + (((List.map mklabpat (list_of_patt p [])), Closed))) | PaStr (loc, s) -> mkpat loc (Ppat_constant @@ -14539,7 +14540,8 @@ module Struct = (Pcf_cstr (((ctyp t1), (ctyp t2), (mkloc loc)))) :: l | Ast.CrSem (_, cst1, cst2) -> class_str_item cst1 (class_str_item cst2 l) - | CrInh (_, ce, "") -> (Pcf_inher (Fresh, class_expr ce, None)) :: l + | CrInh (_, ce, "") -> + (Pcf_inher (Fresh, class_expr ce, None)) :: l | CrInh (_, ce, pb) -> (Pcf_inher (Fresh, class_expr ce, Some pb)) :: l | CrIni (_, e) -> (Pcf_init (expr e)) :: l @@ -14549,9 +14551,12 @@ module Struct = | Ast.TyNil _ -> None | t -> Some (mkpolytype (ctyp t))) in let e = mkexp loc (Pexp_poly (expr e, t)) - in (Pcf_meth ((s, (mkprivate b), Fresh, e, (mkloc loc)))) :: l + in + (Pcf_meth ((s, (mkprivate b), Fresh, e, (mkloc loc)))) :: + l | CrVal (loc, s, b, e) -> - (Pcf_val ((s, (mkmutable b), Fresh, (expr e), (mkloc loc)))) :: l + (Pcf_val ((s, (mkmutable b), Fresh, (expr e), (mkloc loc)))) :: + l | CrVir (loc, s, b, t) -> (Pcf_virt ((s, (mkprivate b), (mkpolytype (ctyp t)), (mkloc loc)))) :: @@ -19410,7 +19415,11 @@ module Printers = pp f "@[<2>%a@ when@ %a@ ->@ %a@]" o#patt p o#under_pipe#expr w o#under_pipe#expr e - method sum_type = fun f t -> pp f "@[<hv0>[ %a ]@]" o#ctyp t + method sum_type = + fun f -> + function + | Ast.TyNil _ -> pp f "[]" + | t -> pp f "@[<hv0>[ %a ]@]" o#ctyp t method ident = fun f i -> |
