aboutsummaryrefslogtreecommitdiff
path: root/src/Documentation
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-08-26 20:31:58 +0000
committerDavid Waern <david.waern@gmail.com>2010-08-26 20:31:58 +0000
commit5a5c656c9817e1f0d83531cec4eeca38333519df (patch)
treea98396a5784e5e2717a3c380ab51facb858dcfb1 /src/Documentation
parenta127473902c8d833f15ad7fd83f29cc786827f14 (diff)
Follow recent API additions with some refactorings
Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface.
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
+