Adjust a pattern to avoid tail

This commit is contained in:
Joseph C. Sible 2020-02-02 00:22:52 -05:00
parent 115ef29079
commit 6595e14d25
1 changed files with 2 additions and 2 deletions

View File

@ -1644,9 +1644,9 @@ checkSpuriousExec _ = doLists
doList = doList' . stripCleanup doList = doList' . stripCleanup
-- The second parameter is True if we are in a loop -- The second parameter is True if we are in a loop
-- In that case we should emit the warning also if `exec' is the last statement -- In that case we should emit the warning also if `exec' is the last statement
doList' t@(current:following:_) False = do doList' (current:t@(following:_)) False = do
commentIfExec current commentIfExec current
doList (tail t) False doList t False
doList' (current:tail) True = do doList' (current:tail) True = do
commentIfExec current commentIfExec current
doList tail True doList tail True