From e8c6e9beca2564016cacc4e85921f5ae99fa3dfd Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sat, 13 Oct 2012 16:03:12 +0200 Subject: Minor code simplification --- src/Haddock.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Haddock.hs') diff --git a/src/Haddock.hs b/src/Haddock.hs index c53b4543..f79f3470 100644 --- a/src/Haddock.hs +++ b/src/Haddock.hs @@ -272,8 +272,7 @@ readInterfaceFiles :: MonadIO m -> [(DocPaths, FilePath)] -> m [(DocPaths, InterfaceFile)] readInterfaceFiles name_cache_accessor pairs = do - mbPackages <- mapM tryReadIface pairs - return (catMaybes mbPackages) + catMaybes `liftM` mapM tryReadIface pairs where -- try to read an interface, warn if we can't tryReadIface (paths, file) = do -- cgit v1.2.3