1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00

Tidy up with fromMaybe.

This commit is contained in:
Rob Rix 2016-06-28 15:04:04 -04:00
parent 83a88d0e32
commit ad930bf047

View File

@ -38,10 +38,7 @@ rws compare getLabel as bs
then pure $! insert v
else do
put (Set.insert k mapped)
case compare nearest v of
Just y -> do
pure y
_ -> pure $! replace nearest v
pure $! fromMaybe (replace nearest v) (compare nearest v)
deleteRemaining diff mapped = diff <> (delete . snd <$> filter (not . (`Set.member` mapped) . fst) fas)
data Gram label = Gram { stem :: [Maybe label], base :: [Maybe label] }