Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Functions to parse and display Haddock HTML
Synopsis
- data Html
- data HtmlPage
- data Declaration = Declaration {
- dAnchors :: Set Anchor
- dAnchor :: Anchor
- dSignature :: Html
- dSignatureExpanded :: Html
- dContent :: [Html]
- dModuleUrl :: ModuleUrl
- dDeclUrl :: DeclUrl
- dCompletion :: String
- data Module = Module {
- mTitle :: String
- mDescription :: Maybe Html
- mDeclarations :: [Declaration]
- mUrl :: ModuleUrl
- data Package = Package {}
- parseHtmlDocument :: ByteString -> HtmlPage
- parseModuleDocs :: ModuleUrl -> HtmlPage -> Module
- parsePackageDocs :: PackageUrl -> HtmlPage -> Package
- sourceLinks :: ModuleUrl -> HtmlPage -> [(Anchor, SourceLink)]
- fileInfo :: SourceLink -> HtmlPage -> FileInfo
- class HasCompletion a where
- completion :: a -> String
- innerString :: Html -> String
- prettyHtml :: IsHtml html => html -> Doc
- numbered :: [Doc] -> [Doc]
- parseHoogleHtml :: String -> Html
- link :: Doc -> Doc
Documentation
An html element
data Declaration Source #
An exported declaration
Declaration | |
|
Instances
HasCompletion Declaration Source # | |
Defined in Docs.CLI.Haddock completion :: Declaration -> String Source # |
Module | |
|
Instances
HasCompletion Module Source # | |
Defined in Docs.CLI.Haddock completion :: Module -> String Source # |
Instances
HasCompletion Package Source # | |
Defined in Docs.CLI.Haddock completion :: Package -> String Source # |
parsePackageDocs :: PackageUrl -> HtmlPage -> Package Source #
sourceLinks :: ModuleUrl -> HtmlPage -> [(Anchor, SourceLink)] Source #
fileInfo :: SourceLink -> HtmlPage -> FileInfo Source #
Convert an html page into a src file and inform of line number of SourceLink
class HasCompletion a where Source #
Types that can be selected with tab completion
completion :: a -> String Source #
Instances
HasCompletion Declaration Source # | |
Defined in Docs.CLI.Haddock completion :: Declaration -> String Source # | |
HasCompletion Module Source # | |
Defined in Docs.CLI.Haddock completion :: Module -> String Source # | |
HasCompletion Package Source # | |
Defined in Docs.CLI.Haddock completion :: Package -> String Source # | |
HasCompletion Item Source # | |
Defined in Docs.CLI.Hoogle completion :: Item -> String Source # | |
HasCompletion String Source # | |
Defined in Docs.CLI.Haddock completion :: String -> String Source # | |
HasCompletion a => HasCompletion (NonEmpty a) Source # | |
Defined in Docs.CLI.Haddock completion :: NonEmpty a -> String Source # |
innerString :: Html -> String Source #
prettyHtml :: IsHtml html => html -> Doc Source #
Render Haddock's Html
parseHoogleHtml :: String -> Html Source #