diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-13 15:15:38 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-13 15:15:38 +0200 |
commit | 4dc9c211ccb6274b6663d71cf6f768d09ae76d66 (patch) | |
tree | 94474a382c95bc129c9879a7119b3372c4931be6 /src | |
parent | c542021275f740d716d57c4c9b6135b39a4ccc38 (diff) |
Minor code simplification
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Haddock.hs b/src/Haddock.hs index 3ac2115d..f3535fb1 100644 --- a/src/Haddock.hs +++ b/src/Haddock.hs @@ -32,7 +32,8 @@ import Haddock.Options import Haddock.Utils import Haddock.GhcUtils hiding (pretty) -import Control.Monad +import Control.Monad hiding (forM_) +import Data.Foldable (forM_) import Control.Exception import Data.Maybe import Data.IORef @@ -143,9 +144,8 @@ haddock args = handleTopExceptions $ do (packages, ifaces, homeLinks) <- readPackagesAndProcessModules flags files -- Dump an "interface file" (.haddock file), if requested. - case optDumpInterfaceFile flags of - Just f -> liftIO $ dumpInterfaceFile f (map toInstalledIface ifaces) homeLinks - Nothing -> return () + forM_ (optDumpInterfaceFile flags) $ \f -> do + liftIO $ dumpInterfaceFile f (map toInstalledIface ifaces) homeLinks -- Render the interfaces. liftIO $ renderStep dflags flags qual packages ifaces |