Use isNothing instead of reimplementing it

This commit is contained in:
Joseph C. Sible 2020-02-09 22:14:44 -05:00
parent 7fc9496320
commit 8f0448133c
1 changed files with 1 additions and 2 deletions

View File

@ -3250,9 +3250,8 @@ checkPipeToNowhere _ t =
"Redirecting to '" ++ name ++ "', a command that doesn't read stdin. " ++ suggestion "Redirecting to '" ++ name ++ "', a command that doesn't read stdin. " ++ suggestion
-- Could any words in a SimpleCommand consume stdin (e.g. echo "$(cat)")? -- Could any words in a SimpleCommand consume stdin (e.g. echo "$(cat)")?
hasAdditionalConsumers t = fromMaybe True $ do hasAdditionalConsumers t = isNothing $
doAnalysis (guard . not . mayConsume) t doAnalysis (guard . not . mayConsume) t
return False
mayConsume t = mayConsume t =
case t of case t of