git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
All you need is nub. Fix #1582
2704b38Phil Freeman
src/Language/PureScript/Linter/Exhaustive.hs+1−1
@@ -246,7 +246,7 @@ checkExhaustive env mn numArgs cas = makeResult . first nub $ foldl' step ([init
246 step :: ([[Binder]], (Either RedudancyError Bool, [[Binder]])) -> CaseAlternative -> ([[Binder]], (Either RedudancyError Bool, [[Binder]]))
246 step :: ([[Binder]], (Either RedudancyError Bool, [[Binder]])) -> CaseAlternative -> ([[Binder]], (Either RedudancyError Bool, [[Binder]]))
247 step (uncovered, (nec, redundant)) ca =
247 step (uncovered, (nec, redundant)) ca =
248 let (missed, pr) = unzip (map (missingAlternative env mn ca) uncovered)
248 let (missed, pr) = unzip (map (missingAlternative env mn ca) uncovered)
249− (missed', approx) = splitAt 10000 (concat missed)
249+ (missed', approx) = splitAt 10000 (nub (concat missed))
250 cond = liftA2 (&&) (or <$> sequenceA pr) nec
250 cond = liftA2 (&&) (or <$> sequenceA pr) nec
251 in (missed', ( if null approx
251 in (missed', ( if null approx
252 then cond
252 then cond