[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] result-y errors and MirageOS 3
Thomas, thank you so much for your work on this! this is much better now :) hannes On 23/12/2016 12:08, Thomas Gazagnaire wrote: > All the 30 pull request (!!) have been merged. Please open an issue if you > see any strange errors related to error types. > > We decided to use the following error scheme after few months of going back > and forth: > > - Every mirage-type signature (e.g. BLOCK, FLOW, etc) now defines an `error` > type (and sometime `write_error` too) which can either be abstract or which > can be exposed as a private polymorphic variant, like `type error = private > [> `Closed]` > - Every mirage-type signature now exposes a `pp_error` (and sometime > `pp_write_error`) which can print the errors. > - Some helper printers have been temporary defined in `Mirage_pp` (from the > `mirage-runtime` module) which will disappear completely before 3.0 (see > bellow). > - Module implementing these signature can use richer error types extending > the base errors (see mirage-channel[0]). It is also perfectly fine to export > these enriched error types in the mli. > > The helper printers will move to individual related packages, like > `Mirage_block.pp_error` (this specific function has already been moved, > during the the signature split that I started to implement in the same > patchset, to see how it works in practice; short answer: it works well). > > Individual packages (with pretty-printer and sometimes much more[1]) now > exists for: > - DEVICE (Mirage_device[2] in mirage-device) > - CONSOLE (Mirage_console[3] in mirage-console) > - TIME (Mirage_time[4] in mirage-time) > - PCLOCK and MCLOCK (Mirage_clock[5] in mirage-clock) > - RANDOM (Mirage_random[6] in mirage-random) > - BLOCK (Mirage_block[7] and mirage-block) > - FLOW (Mirage_flow[8] in mirage-flow) > > And same thing for their respective lwt implementation (V1_LWT.CONSOLE is an > alias to Mirage_console_lwt.S in mirage-console-lwt, etc.) > > Thanks for everyone involved, especially Thomas Leonard, Mindy Preston and > Hannes Mehnert for the groundwork and Jeremy Yallop and Leo White for the > patience to explain the arcane of private polymorphic variants! > > Best, > Thomas > > [0]: https://github.com/mirage/mirage-channel/blob/master/src/channel.ml#L35 > [1]: https://mirage.github.io/mirage-flow/ > [2]: https://mirage.github.io/mirage-device/ > [3]: https://mirage.github.io/mirage-console/ > [4]: https://mirage.github.io/mirage-time/ > [5]: https://mirage.github.io/mirage-clock/ > [6]: https://mirage.github.io/mirage-random/ > [7]: https://mirage.github.io/mirage-block/ > [8[: https://mirage.github.io/mirage-flow/ > > > > _______________________________________________ > MirageOS-devel mailing list > MirageOS-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel > _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |