Safe Haskell | None |
---|
Haddock compatibilty layer and query functions.
- search :: Maybe PackageConfig -> Maybe PackageName -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])
- searchWithPackage :: PackageConfig -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])
- searchWithInterface :: PackageConfig -> ModuleName -> Identifier -> InstalledInterface -> Ghc (Either DocsException [IdentDoc])
- interfaceNameMap :: InstalledInterface -> Map String (Doc String)
- interfaceArgMap :: InstalledInterface -> Map String (Map Int (Doc Name))
- lookupArgsDocs :: InstalledInterface -> Identifier -> Ghc (Maybe [(Int, Doc String)])
- getPackagesByModule :: ModuleName -> Ghc (Either [Module] [PackageConfig])
- getHaddockInterfacesByPackage :: PackageConfig -> Ghc [Either DocsException InterfaceFile]
- descendSearch :: PackageConfig -> Identifier -> Name -> Ghc (Either DocsException [IdentDoc])
Searching for ident docs
search :: Maybe PackageConfig -> Maybe PackageName -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])Source
Search a name in the given module.
searchWithPackage :: PackageConfig -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])Source
Search for the given identifier in the given package.
searchWithInterface :: PackageConfig -> ModuleName -> Identifier -> InstalledInterface -> Ghc (Either DocsException [IdentDoc])Source
Search for the given identifier in the interface.
Get documentation of parts of things
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.
lookupArgsDocs :: InstalledInterface -> Identifier -> Ghc (Maybe [(Int, Doc String)])Source
Find arguments documentation for the identifier.
Querying for packages and interfaces
getPackagesByModule :: ModuleName -> Ghc (Either [Module] [PackageConfig])Source
Search for a module's package, returning suggestions if not found.
getHaddockInterfacesByPackage :: PackageConfig -> Ghc [Either DocsException InterfaceFile]Source
Get the Haddock interfaces of the given package.
Internal functions
descendSearch :: PackageConfig -> Identifier -> Name -> Ghc (Either DocsException [IdentDoc])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.