diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-08-23 10:09:34 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-08-23 10:09:34 +0100 |
commit | 5d41d4396425fc5c2e9b90d3e1e0baa5dc1ac224 (patch) | |
tree | df13708dded1d48172cb51feb05fb41e74565ac8 /haddock-api/src/Documentation/Haddock.hs | |
parent | 92e50dba7b099f24cc357de71aaa7fe06bd061b1 (diff) |
Move sources under haddock-api/src
Diffstat (limited to 'haddock-api/src/Documentation/Haddock.hs')
-rw-r--r-- | haddock-api/src/Documentation/Haddock.hs | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/haddock-api/src/Documentation/Haddock.hs b/haddock-api/src/Documentation/Haddock.hs new file mode 100644 index 00000000..1ff5cf75 --- /dev/null +++ b/haddock-api/src/Documentation/Haddock.hs @@ -0,0 +1,89 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Documentation.Haddock +-- Copyright : (c) David Waern 2010 +-- License : BSD-like +-- +-- Maintainer : haddock@projects.haskellorg +-- Stability : experimental +-- Portability : portable +-- +-- The Haddock API: A rudimentory, highly experimental API exposing some of +-- the internals of Haddock. Don't expect it to be stable. +----------------------------------------------------------------------------- +module Documentation.Haddock ( + + -- * Interface + Interface(..), + InstalledInterface(..), + createInterfaces, + processModules, + + -- * Export items & declarations + ExportItem(..), + DocForDecl, + FnArgsDoc, + + -- * Cross-referencing + LinkEnv, + DocName(..), + + -- * Instances + DocInstance, + InstHead, + + -- * Documentation comments + Doc, + DocH(..), + Example(..), + Hyperlink(..), + DocMarkup(..), + Documentation(..), + ArgMap, + AliasMap, + WarningMap, + DocMap, + HaddockModInfo(..), + markup, + + -- * Interface files + InterfaceFile(..), + readInterfaceFile, + nameCacheFromGhc, + freshNameCache, + NameCacheAccessor, + + -- * Flags and options + Flag(..), + DocOption(..), + + -- * Error handling + HaddockException(..), + + -- * Program entry point + haddock, + haddockWithGhc, + getGhcDirs, + withGhc +) where + + +import Haddock.InterfaceFile +import Haddock.Interface +import Haddock.Types +import Haddock.Options +import Haddock.Utils +import Haddock + + +-- | 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, _) <- withGhc flags (readPackagesAndProcessModules flags modules) + return ifaces |