On Wed, 4 Feb 2015 00:53:07 +0100, Daniel Bünzli wrote: > > Le mercredi, 4 février 2015 à 00:30, Christophe Troestler a écrit : > > […} OPAM package "result" declaring Result.t together with a few useful > > functions […] > > I'm not sure that's very useful since often you will want to work > with this type over a monadic concurrency library and/or provide > combinators that interact with a logging library (e.g. see the > assemblage combinators I linked to earlier). > > It seems to me there will be very little left and loose coupling > between packages seems fine to me in that case. I rather think that > mirage itself should define a library with all the good tools to > enforce its chosen error handling scheme.
It seems to me that libraries that are not intended to be exclusively used with mirage could use this to report error-values. The functions provided by the module “Result” would be tailored to those who only want to use it directly. By providing a common representation, it would be easy to use a library making use of Result.t in Mirage — where there would be combinators (such as “>>=?” on “Result.t Lwt.t”) that could properly interact with a logging facility if desired. _______________________________________________ MirageOS-devel mailing list [email protected] http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
