Commit ba8b8a9f authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #1699 from fhartwig/master

Add a warning for sections that are not on the top level.
parents 899d874a 07ff584b
......@@ -1000,8 +1000,14 @@ parsePackageDescription file = do
let simplFlds = [ F l n v | F l n v <- allflds ]
condFlds = [ f | f@IfBlock{} <- allflds ]
sections = [ s | s@Section{} <- allflds ]
let (depFlds, dataFlds) = partition isConstraint simplFlds
mapM_
(\(Section l n _ _) -> lift . warning $
"Unexpected section '" ++ n ++ "' on line " ++ show l)
sections
a <- parser dataFlds
deps <- liftM concat . mapM (lift . parseConstraint) $ depFlds
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment