The constructor XX is defined in both types
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm tring to translate the xml schema in term of OCaml types : > type element = string Xml.Attributes.t > and group = string Xml.Attributes.t * sub_group option > and choice = string Xml.Attributes.t * sub_choice list > and sequence = string Xml.Attributes.t * sub_choice list > > > and sub_choice = > | Element of element > | Group of group > | Choice of choice > | Sequence of sequence > > and sub_group = > | Choice of choice > | Sequence of sequence > The compilation give me the warning : > the constructor Choice is defined in both types sub_choice and sub_group > the constructor Sequence is defined in both types sub_choice and sub_group. I know I could use polymorphic variants to prevent this, but I want to restrict each type with the contructors defined in the schema. (I also want to be as close as possible with the xsd names types). My question is : what do I risks ? I did some tests and this seems to work correctly in pattern matching and I did not see where it could break the code. Thank you