Simplify matchToken

This commit is contained in:
Joseph C. Sible 2020-02-09 20:36:14 -05:00
parent 0e00249eae
commit 057cc714b3
1 changed files with 1 additions and 4 deletions

View File

@ -1220,10 +1220,7 @@ checkLiteralBreakingTest _ t = sequence_ $
where
hasEquals = matchToken ('=' `elem`)
isNonEmpty = matchToken (not . null)
matchToken m t = isJust $ do
str <- getLiteralString t
guard $ m str
return ()
matchToken m t = maybe False m (getLiteralString t)
comparisonWarning list = do
token <- find hasEquals list