Commits

Anonymous 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

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)

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 *)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.