HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulecheapskate-0.1.1.2Haskell2010

Cheapskate

  • 3 values
valuemarkdown :: Options -> Text -> Doc
#

Parses the input as a markdown document. Note that Doc is an instance of ToMarkup, so the document can be converted to Html using toHtml. A simple Text to Html filter would be

markdownToHtml :: Text -> Html
markdownToHtml = toHtml . markdown def
methoddef :: a
#

The default value for this type.

valuewalk :: (Data a, Data b) => (a -> a) -> b -> b
#

Apply a transformation bottom-up to every node of a parsed document. This can be used, for example, to transform specially marked code blocks to highlighted code or images. Here is a simple example that promotes the levels of headers:

promoteHeaders :: Doc -> Doc
promoteHeaders = walk promoteHeader
  where promoteHeader (Header n ils) = Header (n+1) ils
        promoteHeader x              = x

Orphan instances

1 instance