|
1 | 1 | -----------------------------------------------------------------------------
|
| 2 | + |
| 3 | +----------------------------------------------------------------------------- |
| 4 | + |
2 | 5 | -- |
|
3 | 6 | -- Module : Documentation.Haddock
|
4 | 7 | -- Copyright : (c) David Waern 2010
|
|
10 | 13 | --
|
11 | 14 | -- The Haddock API: A rudimentary, highly experimental API exposing some of
|
12 | 15 | -- the internals of Haddock. Don't expect it to be stable.
|
13 |
| ------------------------------------------------------------------------------ |
14 |
| -module Documentation.Haddock ( |
15 |
| - |
16 |
| - -- * Interface |
17 |
| - Interface(..), |
18 |
| - InstalledInterface(..), |
19 |
| - toInstalledIface, |
20 |
| - createInterfaces, |
21 |
| - processModules, |
| 16 | +module Documentation.Haddock |
| 17 | + ( -- * Interface |
| 18 | + Interface (..) |
| 19 | + , InstalledInterface (..) |
| 20 | + , toInstalledIface |
| 21 | + , createInterfaces |
| 22 | + , processModules |
22 | 23 |
|
23 |
| - -- * Export items & declarations |
24 |
| - ExportItem(..), |
25 |
| - DocForDecl, |
26 |
| - FnArgsDoc, |
| 24 | + -- * Export items & declarations |
| 25 | + , ExportItem (..) |
| 26 | + , DocForDecl |
| 27 | + , FnArgsDoc |
27 | 28 |
|
28 |
| - -- * Cross-referencing |
29 |
| - LinkEnv, |
30 |
| - DocName(..), |
| 29 | + -- * Cross-referencing |
| 30 | + , LinkEnv |
| 31 | + , DocName (..) |
31 | 32 |
|
32 |
| - -- * Instances |
33 |
| - DocInstance, |
34 |
| - InstHead, |
| 33 | + -- * Instances |
| 34 | + , DocInstance |
| 35 | + , InstHead |
35 | 36 |
|
36 |
| - -- * Documentation comments |
37 |
| - Doc, |
38 |
| - MDoc, |
39 |
| - DocH(..), |
40 |
| - Example(..), |
41 |
| - Hyperlink(..), |
42 |
| - DocMarkup, |
43 |
| - DocMarkupH(..), |
44 |
| - Documentation(..), |
45 |
| - ArgMap, |
46 |
| - WarningMap, |
47 |
| - DocMap, |
48 |
| - HaddockModInfo(..), |
49 |
| - markup, |
| 37 | + -- * Documentation comments |
| 38 | + , Doc |
| 39 | + , MDoc |
| 40 | + , DocH (..) |
| 41 | + , Example (..) |
| 42 | + , Hyperlink (..) |
| 43 | + , DocMarkup |
| 44 | + , DocMarkupH (..) |
| 45 | + , Documentation (..) |
| 46 | + , ArgMap |
| 47 | + , WarningMap |
| 48 | + , DocMap |
| 49 | + , HaddockModInfo (..) |
| 50 | + , markup |
50 | 51 |
|
51 |
| - -- * Interface files |
52 |
| - InterfaceFile(..), |
53 |
| - readInterfaceFile, |
54 |
| - freshNameCache, |
| 52 | + -- * Interface files |
| 53 | + , InterfaceFile (..) |
| 54 | + , readInterfaceFile |
| 55 | + , freshNameCache |
55 | 56 |
|
56 |
| - -- * Flags and options |
57 |
| - Flag(..), |
58 |
| - DocOption(..), |
| 57 | + -- * Flags and options |
| 58 | + , Flag (..) |
| 59 | + , DocOption (..) |
59 | 60 |
|
60 |
| - -- * Error handling |
61 |
| - HaddockException(..), |
| 61 | + -- * Error handling |
| 62 | + , HaddockException (..) |
62 | 63 |
|
63 |
| - -- * Program entry point |
64 |
| - haddock, |
65 |
| - haddockWithGhc, |
66 |
| - getGhcDirs, |
67 |
| - withGhc |
68 |
| -) where |
| 64 | + -- * Program entry point |
| 65 | + , haddock |
| 66 | + , haddockWithGhc |
| 67 | + , getGhcDirs |
| 68 | + , withGhc |
| 69 | + ) where |
69 | 70 |
|
70 | 71 | import Documentation.Haddock.Markup (markup)
|
71 |
| -import Haddock.InterfaceFile |
| 72 | +import Haddock |
72 | 73 | import Haddock.Interface
|
73 |
| -import Haddock.Types |
| 74 | +import Haddock.InterfaceFile |
74 | 75 | import Haddock.Options
|
75 |
| -import Haddock |
76 |
| - |
| 76 | +import Haddock.Types |
77 | 77 |
|
78 | 78 | -- | Create 'Interface' structures from a given list of Haddock command-line
|
79 | 79 | -- flags and file or module names (as accepted by 'haddock' executable). Flags
|
80 | 80 | -- that control documentation generation or show help or version information
|
81 | 81 | -- are ignored.
|
82 | 82 | createInterfaces
|
83 |
| - :: [Flag] -- ^ A list of command-line flags |
84 |
| - -> [String] -- ^ File or module names |
85 |
| - -> IO [Interface] -- ^ Resulting list of interfaces |
| 83 | + :: [Flag] |
| 84 | + -- ^ A list of command-line flags |
| 85 | + -> [String] |
| 86 | + -- ^ File or module names |
| 87 | + -> IO [Interface] |
| 88 | + -- ^ Resulting list of interfaces |
86 | 89 | createInterfaces flags modules = do
|
87 | 90 | (_, ifaces, _) <- withGhc flags (readPackagesAndProcessModules flags modules)
|
88 | 91 | return ifaces
|
0 commit comments