You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5958 Reporter:@ppedrot Assigned to:@chambart Status: closed (set by @xavierleroy on 2017-02-16T14:14:08Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 4.03.0+dev / +beta1 Category: runtime system and C interface Tags: patch Related to:#6908 Monitored by:@bobzhang
It 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.