haskell-docs-4.1.1: A program to find and display the docs of a name from a given module.

Safe HaskellNone

Haskell.Docs.Formatting

Contents

Description

Formatting of Haddock documentation.

Synopsis

Formatting

printIdentDocSource

Arguments

:: Bool

Print modules only?

-> Bool

Print package?

-> Bool

Print module?

-> IdentDoc 
-> Ghc () 

Print an identifier' documentation.

formatDoc :: Doc String -> StringSource

Format some documentation to plain text.

Internal functions

doc :: Doc String -> StringSource

Render the doc.

normalize :: [Char] -> [Char]Source

Strip redundant whitespace.

trim :: [Char] -> [Char]Source

Trim either side of a string.

formatExample :: Example -> StringSource

Format an example to plain text.

formatArg :: Show a => a -> Doc String -> StringSource

Format an argument.

indentAfter :: Int -> String -> StringSource

Indent after the first line.