I am currently trying to implement a method of allowing arbitrary record syntax data-types to be converted to and from an XML representation of them using the Read and Show class;
i.e. simply derive either Show and then parse the given String to extract the name/value pairs which can then be converted to XML, or using the XML generate a representation of the data entity (e.g. "Person{name=\"Fred Smith\", age=47}") and read this back into an actual value. However I have one small problem; the order of the incoming parameters of the XML data-type representations is not guaranteed, but according to Haskell 98 report; "If the constructor is defined using record syntax...the fields must be given in the same order as the original declaration." So my question is, is there any method in GHC which allows you to extract the order of the constructors in a type or to parse a type-representation in such a way that the order of the records doesn't matter (I am looking for ease/simplicity of use)? Or do I just tell them to put the records in alphabetical order? -Si. (Please CC replies to me). -- Simon D. Foster <[EMAIL PROTECTED]> Sheffield University _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell