| Anonymous | Login | Signup for a new account | 2013-05-23 21:19 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0003882 | OCaml | OCaml general | public | 2005-11-21 10:46 | 2005-11-22 13:00 | ||||||
| Reporter | Jean-Christophe Filliatre | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0003882: Wish: Format.pp_print_list | ||||||||||
| Description | This is a feature wish. It would be nice to have a function in Format to print lists, that is something like val pp_print_list : (formatter -> 'a -> unit) -> formatter -> 'a list -> unit pp_print_list expects a function to print elements, and return a function to print a list of such elements. This way we could write fprintf fmt "here is the list %a" (pp_print_list printer) l It would be even nicer to have a quotation for this. I know that most letters are already used; let's use %z in this example: fprintf fmt "here is the list %z" printer l Additionally, it would be nice to be able to indicate a separator to be printed between the list elements, for instance: val pp_print_list : ?sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a list -> unit (that would defaults to nothings) and, again, a corresponding quotation: fprintf fmt "here is the list %Z" printer sep l where sep is the separator function e.g. (fun fmt () -> fprintf fmt ",@ ") | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-21 10:46 | Jean-Christophe Filliatre | New Issue | |
| 2005-11-22 13:00 | doligez | Status | new => acknowledged |
| Copyright © 2000 - 2011 MantisBT Group |