From efc1254793ef32e0b51b9e51dbc8f85a1d8a92d6 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Tue, 27 Nov 2007 14:32:08 +0000 Subject: [PATCH] [camlp4] Use the constraint keyword instead of type in class signatures too (PR#4419). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- camlp4/Camlp4/Printers/OCaml.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/camlp4/Camlp4/Printers/OCaml.ml b/camlp4/Camlp4/Printers/OCaml.ml index db6393621..91e2515a0 100644 --- a/camlp4/Camlp4/Printers/OCaml.ml +++ b/camlp4/Camlp4/Printers/OCaml.ml @@ -945,8 +945,8 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct o#class_sig_item f csg | <:class_sig_item< $csg1$; $csg2$ >> -> do { o#class_sig_item f csg1; cut f; o#class_sig_item f csg2 } - | <:class_sig_item< type $t1$ = $t2$ >> -> - pp f "@[<2>type@ %a =@ %a%(%)@]" o#ctyp t1 o#ctyp t2 semisep + | <:class_sig_item< constraint $t1$ = $t2$ >> -> + pp f "@[<2>constraint@ %a =@ %a%(%)@]" o#ctyp t1 o#ctyp t2 semisep | <:class_sig_item< inherit $ct$ >> -> pp f "@[<2>inherit@ %a%(%)@]" o#class_type ct semisep | <:class_sig_item< method $private:pr$ $s$ : $t$ >> -> @@ -971,7 +971,7 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct o#class_str_item f cst | <:class_str_item< $cst1$; $cst2$ >> -> do { o#class_str_item f cst1; cut f; o#class_str_item f cst2 } - | <:class_str_item< type $t1$ = $t2$ >> -> + | <:class_str_item< constraint $t1$ = $t2$ >> -> pp f "@[<2>constraint %a =@ %a%(%)@]" o#ctyp t1 o#ctyp t2 semisep | <:class_str_item< inherit $ce$ >> -> pp f "@[<2>inherit@ %a%(%)@]" o#class_expr ce semisep