The .cabal file format is not trivial, especially with the introduction
of configurations and the section syntax that goes with that. This module
has a bunch of parsing functions that is used by the .cabal parser and a
couple others. It has the parsing framework code and also little parsers for
many of the formats we get in various .cabal file fields, like module
names, comma separated lists etc.

The type of a function which, given a name-value pair of an
unrecognized field, and the current structure being built,
decides whether to incorporate the unrecognized field
(by returning Just x, where x is a possibly modified version
of the structure being built), or not (by returning Nothing).