Use forM_ instead of reimplementing it
This commit is contained in:
parent
962fad038c
commit
7fc9496320
|
@ -3090,11 +3090,10 @@ checkUnmatchableCases params t =
|
||||||
|
|
||||||
tupMap f l = map (\x -> (x, f x)) l
|
tupMap f l = map (\x -> (x, f x)) l
|
||||||
checkDoms ((glob, Just x), rest) =
|
checkDoms ((glob, Just x), rest) =
|
||||||
case filter (\(_, p) -> x `pseudoGlobIsSuperSetof` p) valids of
|
forM_ (find (\(_, p) -> x `pseudoGlobIsSuperSetof` p) valids) $
|
||||||
((first,_):_) -> do
|
\(first,_) -> do
|
||||||
warn (getId glob) 2221 $ "This pattern always overrides a later one" <> patternContext (getId first)
|
warn (getId glob) 2221 $ "This pattern always overrides a later one" <> patternContext (getId first)
|
||||||
warn (getId first) 2222 $ "This pattern never matches because of a previous pattern" <> patternContext (getId glob)
|
warn (getId first) 2222 $ "This pattern never matches because of a previous pattern" <> patternContext (getId glob)
|
||||||
_ -> return ()
|
|
||||||
where
|
where
|
||||||
patternContext :: Id -> String
|
patternContext :: Id -> String
|
||||||
patternContext id =
|
patternContext id =
|
||||||
|
|
Loading…
Reference in New Issue