on master help sign in
debug
commit5f685f29fe834808c3b9c96a27ce686477f55003 authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateThu 16 Jan 2020, 13:55 (7 years ago) parenta0aa013
1 file changed+3−4
src/Development/IDE/Core/Completions.hs+3−4
src/Development/IDE/Core/Completions.hs+3−4
@@ -259,9 +259,8 @@ cacheDataProducer packageState dflags tm tcs = do
259259 rdrEnv = tcg_rdr_env $ fst $ tm_internals_ tm
260260 rdrElts = globalRdrEnvElts rdrEnv
261261
262− foldMapM :: (Foldable f, Monad m, Monoid b) => (a -> m b) -> f a -> m b
263− foldMapM f xs = foldr step return xs mempty where
264− step x r z = f x >>= \y -> r $! z `mappend` y
262+ foldMapM :: (Traversable f, Monad m, Monoid b) => (a -> m b) -> f a -> m b
263+ foldMapM f xs = foldMap id <$> traverse f xs
265264
266265 getCompls :: [GlobalRdrElt] -> IO ([CompItem],QualCompls)
267266 getCompls = foldMapM getComplsForOne
@@ -536,4 +535,4 @@ prefixes =
536535 , "$t"
537536 , "$c"
538537 , "$m"
539− ]
538+ ]