Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005958OCamlOCaml runtime systempublic2013-03-23 18:502014-12-06 18:14
Reporterppedrot 
Assigned Tochambart 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.03.0+dev 
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,230 bytes) 2014-06-20 16:06 [Show Content]
patch file icon 0002-toplevel-extends-install_printer-to-accept-parameter.patch [^] (4,445 bytes) 2014-06-20 16:06 [Show Content]
patch file icon 0003-toplevel-generic-printers-are-only-allowed-with-new-.patch [^] (4,129 bytes) 2014-06-20 16:06 [Show Content]
patch file icon 0004-toplevel-be-explicit-about-what-path-are-used-for.patch [^] (2,517 bytes) 2014-06-20 16:06 [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.
(0011766)
chambart (developer)
2014-06-20 16:08

I updated the patches for lastest trunk and added a fix to prevent adding generic printers with old-style type ('a -> unit instead of formatter -> 'a -> unit)
(0012565)
ppedrot (reporter)
2014-11-23 15:50

Is there any hope to see those patches merged?
(0012689)
gasche (developer)
2014-12-06 18:14

Merged in trunk, thanks!

- 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
2014-06-20 16:05 chambart File Deleted: 0001-toplevel-allows-the-extension-of-genprintval.ml-with.patch
2014-06-20 16:05 chambart File Deleted: 0002-toplevel-extends-install_printer-to-accept-parameter.patch
2014-06-20 16:06 chambart File Added: 0001-toplevel-allows-the-extension-of-genprintval.ml-with.patch
2014-06-20 16:06 chambart File Added: 0002-toplevel-extends-install_printer-to-accept-parameter.patch
2014-06-20 16:06 chambart File Added: 0003-toplevel-generic-printers-are-only-allowed-with-new-.patch
2014-06-20 16:06 chambart File Added: 0004-toplevel-be-explicit-about-what-path-are-used-for.patch
2014-06-20 16:08 chambart Note Added: 0011766
2014-11-23 15:50 ppedrot Note Added: 0012565
2014-12-06 18:14 gasche Note Added: 0012689
2014-12-06 18:14 gasche Status acknowledged => resolved
2014-12-06 18:14 gasche Fixed in Version => 4.03.0+dev
2014-12-06 18:14 gasche Resolution open => fixed
2014-12-06 18:14 gasche Assigned To => chambart


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker