Safe Haskell | None |
---|---|
Language | Haskell98 |
Haddock compatibilty layer and query functions.
Synopsis
- searchIdent :: [String] -> Maybe PackageConfig -> Identifier -> Ghc (Either DocsException [IdentDoc])
- searchModuleIdent :: Maybe PackageConfig -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])
- searchPackageModuleIdent :: Maybe PackageConfig -> PackageName -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])
- getIdentifier :: PackageConfig -> PkgID
- excludePrevious :: Eq a => Maybe (InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod) -> [InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod] -> [InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod]
- searchInPackages :: [PackageConfig] -> Maybe ModuleName -> Identifier -> Ghc (Either a [IdentDoc])
- searchWithPackage :: PackageConfig -> Maybe ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc])
- searchWithInterface :: PackageConfig -> Identifier -> InstalledInterface -> Ghc (Either DocsException [IdentDoc])
- lookupArgsDocs :: InstalledInterface -> Identifier -> Ghc (Maybe [(Int, Doc String)])
- getPackagesByModule :: ModuleName -> Ghc [PackageConfig]
- getHaddockInterfacesByPackage :: PackageConfig -> IO [Either DocsException InterfaceFile]
- descendSearch :: PackageConfig -> Identifier -> Name -> Ghc (Either DocsException [IdentDoc])
Searching for ident docs
searchIdent :: [String] -> Maybe PackageConfig -> Identifier -> Ghc (Either DocsException [IdentDoc]) Source #
Search a name in the given module.
searchModuleIdent :: Maybe PackageConfig -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc]) Source #
Search a name in the given module.
searchPackageModuleIdent :: Maybe PackageConfig -> PackageName -> ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc]) Source #
Search a name in the given module from the given package.
getIdentifier :: PackageConfig -> PkgID Source #
Obtain the current notion of a package identifier.
excludePrevious :: Eq a => Maybe (InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod) -> [InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod] -> [InstalledPackageInfo compid a srcpkgname instunitid unitid modulename mod] Source #
searchInPackages :: [PackageConfig] -> Maybe ModuleName -> Identifier -> Ghc (Either a [IdentDoc]) Source #
Search for the identifier in a module in any of the given packages.
searchWithPackage :: PackageConfig -> Maybe ModuleName -> Identifier -> Ghc (Either DocsException [IdentDoc]) Source #
Search for the given identifier in the given package.
searchWithInterface :: PackageConfig -> Identifier -> InstalledInterface -> Ghc (Either DocsException [IdentDoc]) Source #
Search for the given identifier in the interface.
lookupArgsDocs :: InstalledInterface -> Identifier -> Ghc (Maybe [(Int, Doc String)]) Source #
Find arguments documentation for the identifier.
Querying for packages and interfaces
getPackagesByModule :: ModuleName -> Ghc [PackageConfig] Source #
Search for a module's package, returning suggestions if not found. Filters out the given value.
getHaddockInterfacesByPackage :: PackageConfig -> IO [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.