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

Safe HaskellNone
LanguageHaskell98

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 -> IO Bool Source

Print documentation with an initialized package set.

printDocumentation :: DynFlags -> String -> ModuleName -> Maybe String -> Maybe PackageConfig -> IO Bool Source

Print the documentation of a name in the given module.

showPackageName :: PackageIdentifier -> String Source

Show the package name e.g. base.

printWithPackage :: DynFlags -> Bool -> String -> ModuleName -> PackageConfig -> IO Bool Source

Print the documentation with the given package.

printWithInterface :: DynFlags -> Bool -> PackageConfig -> String -> InstalledInterface -> IO Bool Source

Print the documentation from the given interface.

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

Print the documentation of the arguments.

indentAfter :: Int -> String -> String Source

Indent after the first line.

descendSearch :: DynFlags -> String -> Name -> PackageConfig -> IO Bool Source

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 -> String Source

Format some documentation to plain text.

doc :: Doc String -> String Source

Render the doc.

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

Trim either side of a string.

formatExample :: Example -> String Source

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 :: (DynFlags -> IO a) -> IO a Source

Run an action with an initialized GHC package set.

run :: Ghc a -> IO a Source