Fix printing of GADTs by Camlp4 with original syntax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
b50f1df8ff
commit
ac3d343a25
|
@ -371,7 +371,12 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
|
|||
match Ast.list_of_ctyp t [] with
|
||||
[ [] -> ()
|
||||
| ts ->
|
||||
pp f "@[<hv0>| %a@]" (list o#ctyp "@ | ") ts ];
|
||||
pp f "@[<hv0>| %a@]" (list o#constructor_declaration "@ | ") ts ];
|
||||
|
||||
method private constructor_declaration f t =
|
||||
match t with
|
||||
[ <:ctyp< $t1$ : $t2$ -> $t3$ >> -> pp f "@[<2>%a :@ @[<2>%a@ ->@ %a@]@]" o#ctyp t1 o#constructor_type t2 o#ctyp t3
|
||||
| t -> o#ctyp f t ];
|
||||
|
||||
method string f = pp f "%s";
|
||||
method quoted_string f = pp f "%S";
|
||||
|
|
Loading…
Reference in New Issue