Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for rendering generated documentation from PureScript code as HTML.
Synopsis
- data HtmlOutput a = HtmlOutput {
- htmlIndex :: [(Maybe Char, a)]
- htmlModules :: [(ModuleName, HtmlOutputModule a)]
- data HtmlOutputModule a = HtmlOutputModule {
- htmlOutputModuleLocals :: a
- htmlOutputModuleReExports :: [(InPackage ModuleName, a)]
- data HtmlRenderContext = HtmlRenderContext {
- buildDocLink :: Namespace -> Text -> ContainingModule -> Maybe DocLink
- renderDocLink :: DocLink -> Text
- renderSourceLink :: SourceSpan -> Maybe Text
- nullRenderContext :: HtmlRenderContext
- declNamespace :: Declaration -> Namespace
- packageAsHtml :: (InPackage ModuleName -> Maybe HtmlRenderContext) -> Package a -> HtmlOutput Html
- moduleAsHtml :: (InPackage ModuleName -> Maybe HtmlRenderContext) -> Module -> (ModuleName, HtmlOutputModule Html)
- makeFragment :: Namespace -> Text -> Text
- renderMarkdown :: Text -> Html
Documentation
data HtmlOutput a Source #
HtmlOutput | |
|
Instances
Functor HtmlOutput Source # | |
Defined in Language.PureScript.Docs.AsHtml fmap :: (a -> b) -> HtmlOutput a -> HtmlOutput b # (<$) :: a -> HtmlOutput b -> HtmlOutput a # | |
Show a => Show (HtmlOutput a) Source # | |
Defined in Language.PureScript.Docs.AsHtml showsPrec :: Int -> HtmlOutput a -> ShowS # show :: HtmlOutput a -> String # showList :: [HtmlOutput a] -> ShowS # |
data HtmlOutputModule a Source #
HtmlOutputModule | |
|
Instances
Functor HtmlOutputModule Source # | |
Defined in Language.PureScript.Docs.AsHtml fmap :: (a -> b) -> HtmlOutputModule a -> HtmlOutputModule b # (<$) :: a -> HtmlOutputModule b -> HtmlOutputModule a # | |
Show a => Show (HtmlOutputModule a) Source # | |
Defined in Language.PureScript.Docs.AsHtml showsPrec :: Int -> HtmlOutputModule a -> ShowS # show :: HtmlOutputModule a -> String # showList :: [HtmlOutputModule a] -> ShowS # |
data HtmlRenderContext Source #
HtmlRenderContext | |
|
nullRenderContext :: HtmlRenderContext Source #
An HtmlRenderContext for when you don't want to render any links.
declNamespace :: Declaration -> Namespace Source #
packageAsHtml :: (InPackage ModuleName -> Maybe HtmlRenderContext) -> Package a -> HtmlOutput Html Source #
moduleAsHtml :: (InPackage ModuleName -> Maybe HtmlRenderContext) -> Module -> (ModuleName, HtmlOutputModule Html) Source #
renderMarkdown :: Text -> Html Source #
Render Markdown to HTML. Safe for untrusted input. Relative links are | removed.