Use mapM_ instead of isJust and fromJust

This commit is contained in:
Joseph C. Sible 2024-12-13 23:45:32 -05:00
parent 5adfea21ee
commit 26b949b9b0
1 changed files with 2 additions and 3 deletions

View File

@ -1431,9 +1431,8 @@ prop_checkBackreferencingDeclaration7 = verify (checkBackreferencingDeclaration
checkBackreferencingDeclaration cmd = CommandCheck (Exactly cmd) check checkBackreferencingDeclaration cmd = CommandCheck (Exactly cmd) check
where where
check t = do check t = do
cfga <- asks cfgAnalysis maybeCfga <- asks cfgAnalysis
when (isJust cfga) $ mapM_ (\cfga -> foldM_ (perArg cfga) M.empty $ arguments t) maybeCfga
foldM_ (perArg $ fromJust cfga) M.empty $ arguments t
perArg cfga leftArgs t = perArg cfga leftArgs t =
case t of case t of