Use mapM_ and sequence_ instead of reimplementing them

This commit is contained in:
Joseph C. Sible 2020-02-09 19:53:18 -05:00
parent cc424bac11
commit ffbbfcfe25
4 changed files with 10 additions and 12 deletions

View file

@ -382,7 +382,7 @@ getAssociativeArrays t =
nub . execWriter $ doAnalysis f t
where
f :: Token -> Writer [String] ()
f t@T_SimpleCommand {} = fromMaybe (return ()) $ do
f t@T_SimpleCommand {} = sequence_ $ do
name <- getCommandName t
let assocNames = ["declare","local","typeset"]
guard $ elem name assocNames