Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005958OCamlOCaml runtime systempublic2013-03-23 18:502013-10-21 16:17
Reporterppedrot 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005958: Generalized polymorphic #install_printer
DescriptionIt would be nice to have the toplevel #install_printer recognizing polymorphic printing functions of the following form:

(Formatter.t -> 'a -> unit) -> (Formatter.t -> 'a t -> unit)
(Formatter.t -> 'a -> unit) -> (Formatter.t -> 'b -> unit) -> (Formatter.t -> ('a, 'b) t -> unit)

(... and so forth for any number of parameters)

The additional function arguments would be the current printer specialized at their respective type arguments.

This would permit to reuse the current printer for polymorphic data structures. I think it is possible to do so hacking the compiler-libs, but I did not manage to figure how to do it properly. So having it built-in would be more user-friendly, in particular for the debugger.
Tagspatch
Attached Filespatch file icon 0001-toplevel-allows-the-extension-of-genprintval.ml-with.patch [^] (10,283 bytes) 2013-07-23 13:53 [Show Content]
patch file icon 0002-toplevel-extends-install_printer-to-accept-parameter.patch [^] (4,526 bytes) 2013-07-23 13:53 [Show Content]

- Relationships

-  Notes
(0009834)
hnrgrgr (developer)
2013-07-23 13:56

The attached patches are work in progress and need to be tested and improved.

The first patch allows the generic printer (in 'genprintval') to be extended with parameterised printers. The second one extends the #install_printer directive accordingly.

- Issue History
Date Modified Username Field Change
2013-03-23 18:50 ppedrot New Issue
2013-06-19 15:24 doligez Status new => acknowledged
2013-07-23 13:53 hnrgrgr File Added: 0001-toplevel-allows-the-extension-of-genprintval.ml-with.patch
2013-07-23 13:53 hnrgrgr File Added: 0002-toplevel-extends-install_printer-to-accept-parameter.patch
2013-07-23 13:56 hnrgrgr Note Added: 0009834
2013-10-10 14:27 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker