On 18 Oct 2016, at 15:01, Richard Mortier <richard.mort...@cl.cam.ac.uk> wrote: > > On 18 October 2016 at 15:00, Daniel Bünzli <daniel.buen...@erratique.ch> > 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@lists.xenproject.org https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel