Add a warning for sections that are not on the top level. #1699

Merged
merged 1 commit into from Mar 21, 2014

Projects

None yet

2 participants

@fhartwig
Contributor

Fixes #712.

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.

@23Skidoo
Member

Travis says that this breaks the DeterministicAr test on GHC 7.0.4. Can you fix this?

@fhartwig
Contributor

Sure, I'll look into this. Might be a few days before I get around to it though.

@fhartwig
Contributor
fhartwig commented Mar 2, 2014

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.

@23Skidoo
Member

Merging, since I think that I've fixed the Travis failure in a573d4b.

@23Skidoo 23Skidoo merged commit ba8b8a9 into haskell:master Mar 21, 2014

1 check failed

default The Travis CI build failed
Details
@23Skidoo
Member

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment