PR#5651: printer for abstract data type (camlp4 revised syntax)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12666 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Clerc 2012-07-09 09:07:43 +00:00
parent f0eff81679
commit c922570d0f
2 changed files with 8 additions and 2 deletions

View File

@ -158,6 +158,7 @@ Bug Fixes:
- PR#5610: new unmarshaler (from PR#5318) fails to freshen object identifiers
- PR#5620: invalid printing of type manifest (camlp4 revised syntax)
- PR#5643: issues with .cfi and .loc directives generated by ocamlopt -g
- PR#5651: printer for abstract data type (camlp4 revised syntax)
- PR#5661: fixes for the test suite
- PR#5671: initialization of compare_ext field in caml_final_custom_operations()
- problem with printing of string literals in camlp4 (reported on caml-list)

View File

@ -451,8 +451,13 @@ and print_out_type_decl kwd ppf (name, args, ty, priv, constraints) =
print_kind ty2
| ty -> print_kind ppf ty ]
in
fprintf ppf "@[<2>@[<hv 2>@[%s %t@] =%a@]%a@]" kwd type_defined
print_types ty print_constraints constraints
match ty with
[ Otyp_abstract ->
fprintf ppf "@[<2>@[<hv 2>@[%s %t@]@]%a@]" kwd type_defined
print_constraints constraints
| _ ->
fprintf ppf "@[<2>@[<hv 2>@[%s %t@] =%a@]%a@]" kwd type_defined
print_types ty print_constraints constraints ]
;
(* Phrases *)