aboutsummaryrefslogtreecommitdiff
path: root/src/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'src/Documentation')
-rw-r--r--src/Documentation/Haddock.hs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Documentation/Haddock.hs b/src/Documentation/Haddock.hs
index f277bf78..cfa1220d 100644
--- a/src/Documentation/Haddock.hs
+++ b/src/Documentation/Haddock.hs
@@ -17,7 +17,7 @@ module Documentation.Haddock (
Interface(..),
InstalledInterface(..),
createInterfaces,
- createInterfaces',
+ processModules,
-- * Export items & declarations
ExportItem(..),
@@ -63,3 +63,17 @@ import Haddock.Types
import Haddock.Options
import Haddock.Utils
import Main
+
+
+-- | Create 'Interface' structures from a given list of Haddock command-line
+-- flags and file or module names (as accepted by 'haddock' executable). Flags
+-- that control documentation generation or show help or version information
+-- are ignored.
+createInterfaces
+ :: [Flag] -- ^ A list of command-line flags
+ -> [String] -- ^ File or module names
+ -> IO [Interface] -- ^ Resulting list of interfaces
+createInterfaces flags modules = do
+ (_, ifaces, _) <- readPackagesAndProcessModules flags modules
+ return ifaces
+