[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] blocking pretty-printing



Hi all,

I think a good scheme to use in our libraries for pretty-printing is to define 
a `val pp: Format.formatter -> t -> unit` function to be used with the Format 
module and "%a". Used in conjonction with other Format combinators[1] it can 
help pretty-printing a lots of things simply.

However, one of the issue is that sometimes iterating over a value to 
pretty-print its sub-components is blocking (see [2] for instance) and the unit 
is actually a unit Lwt.t. So using "%a" is not possible anymore.Is there a nice 
solution to this which keeps the compositional properties?

Best,
Thomas

[1] https://github.com/dbuenzli/bos/blob/master/src/bos.mli#L131-L333
[2] https://github.com/mirage/mirage/pull/419#issuecomment-117974012
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.