Since sections can only be at the top level of the .cabal file, we should warn the user if we find something that looks like a section anywhere else. Caveat: This might not be the best place to handle this. We could also handle this in the mkField or ifelse functions in the ParseUtils module, but that would require a more substantial/invasive change.
Add a warning for sections that are not on the top level.
Travis says that this breaks the DeterministicAr test on GHC 7.0.4. Can you fix this?
Sure, I'll look into this. Might be a few days before I get around to it though.
Sorry, I'm afraid I'm unable to reproduce the issue for now. On my machine, the test fails with a different error on GHC 7.0.4 (even without my change), but so do many of the other tests. I'll try again on a Linux machine when I have access to one, but that will probably take a while.
Merging, since I think that I've fixed the Travis failure in a573d4b.
Thanks for your contribution!