[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Using Result instead of Option in libraries
On 18 Oct 2016, at 15:01, Richard Mortier <richard.mortier@xxxxxxxxxxxx> wrote: > > On 18 October 2016 at 15:00, Daniel Bünzli <daniel.buenzli@xxxxxxxxxxxx> > wrote: >> On Tuesday 18 October 2016 at 15:41, Richard Mortier wrote: >>> Sorry-- not familiar enough with the terminology. Any chance one of >>> you could point to an example of using "inclusion rather than union" >>> please? >> >> type err = [ `Sub of Sub.err | `Other | ... ] >> >> vs >> >> type err = [ Sub.err | `Other | ... ] > > Ah! Thanks :) Another example in Cohttp are the HTTP error codes, which are classified in various polymorphic variant structures: https://github.com/mirage/ocaml-cohttp/blob/master/lib/code.mli#L23 ... to ... https://github.com/mirage/ocaml-cohttp/blob/master/lib/code.mli#L112 -anil _______________________________________________ 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 |