Hi all,
This is a start at collecting X- extension fields into a parsed
GenericPackageDescription and making them available through the API.
I've added [(String,String)] fields to the PackageDescription and
BuildInfo types, and updated the parseFields function to take an
extra parameter which can optionally do something with unrecognized
fields. To parse X- fields then simply requires passing a function
which takes unrecognized fields starting with X- and prepends them
to the list of name,value pairs in the new record fields.
Everything compiles and seems to parse things without error. The only
problem is that I am confused about exactly what happens to parsed
BuildInfo records and how one would extract the X- fields from a
GenericPackageDescription later. I know that the X-fields get parsed
into PackageDescription records properly, because they now get printed
out when printing out a PackageDescription; however, I've had no such
luck getting that to happen with Library or Executable objects, so I'm unsure how to test to
see if the parsing worked. Suggestions/comments/pointers/patches
appreciated!
Note that this patch should NOT be applied in its current state! In particular
it definitely breaks the property specified in #155. I'm seeking advice on
how to get it to a place where it can safely be applied.
thanks,
-Brent