haskell-docs-3.0.2: A program to find and display the docs of a name from a given module.

Safe HaskellNone

Documentation.Haddock.Docs

Description

Lookup the documentation of a name in a module (and in a specific package in the case of ambiguity).

Synopsis

Documentation

printDocumentationInitialized :: String -> ModuleName -> Maybe String -> [String] -> IO BoolSource

Print documentation with an initialized package set.

printDocumentation :: DynFlags -> String -> ModuleName -> Maybe String -> Maybe PackageConfig -> Ghc BoolSource

Print the documentation of a name in the given module.

showPackageName :: PackageIdentifier -> StringSource

Show the package name e.g. base.

printWithPackage :: DynFlags -> Bool -> String -> ModuleName -> PackageConfig -> Ghc BoolSource

Print the documentation with the given package.

printWithInterface :: DynFlags -> Bool -> PackageConfig -> String -> ModuleName -> InstalledInterface -> Ghc BoolSource

Print the documentation from the given interface.

printArgs :: InstalledInterface -> String -> Ghc ()Source

Print the documentation of the arguments.

indentAfter :: Int -> String -> StringSource

Indent after the first line.

descendSearch :: DynFlags -> String -> Name -> PackageConfig -> Ghc BoolSource

The module symbol doesn't actually exist in the module we intended, so we descend into the module that it does exist in and restart our search process.

formatDoc :: Doc String -> StringSource

Format some documentation to plain text.

doc :: Doc String -> StringSource

Render the doc.

trim :: [Char] -> [Char]Source

Trim either side of a string.

formatExample :: Example -> StringSource

Format an example to plain text.

interfaceNameMap :: InstalledInterface -> Map String (Doc String)Source

Get a mapping from names to doc string of that name from a Haddock interface.

interfaceArgMap :: InstalledInterface -> Map String (Map Int (Doc Name))Source

Get a mapping from names to doc string of that name from a Haddock interface.

getPackagesByModule :: DynFlags -> ModuleName -> IO (Either [Module] [PackageConfig])Source

Search for a module's package, returning suggestions if not found.

getHaddockInterfacesByPackage :: PackageConfig -> IO [Either String InterfaceFile]Source

Get the Haddock interfaces of the given package.

withInitializedPackages :: [String] -> (DynFlags -> Ghc a) -> IO aSource

Run an action with an initialized GHC package set.

run :: Ghc a -> IO aSource