Commits

xclerc  committed 8d7b27f

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

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12666f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits cd77f89

Comments (0)

Files changed (2)

 - 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)

File camlp4/Camlp4Top/Rprint.ml

           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 *)