Docs-1.0.0: Documentation types library.

Text.Docs.Class

Contents

Description

Classes for Documentable types.

Synopsis

Documentable class

class Documentable a whereSource

Class for types that represents a documentation text. Minimal complete definition: All except lnappend.

Every instance of Documentable class can be an instance of Monoid class.

Methods

text :: String -> aSource

String to a documentation text.

code :: String -> aSource

String to a code format text.

codeblock :: String -> aSource

String to a code block.

emphasize :: a -> aSource

Emphasizing documentation.

dappend :: a -> a -> aSource

Appending documentation.

lnappend :: a -> a -> aSource

Appending documentation, with line break.

renderdoc :: a -> StringSource

Rendering documentation.

Instances

emptydoc :: Documentable a => aSource

An empty documentation.

dunlines :: Documentable a => [a] -> aSource

Documentable version of unlines.

Specific Documentable class.

class Documentable a => DocTitled a whereSource

Documentable types with titles.

Methods

title :: a -> aSource

Making a title.

subtitle :: a -> aSource

Making a subtitle.

Instances

class Documentable a => DocLinked a whereSource

Documentable types with links.

Methods

url :: String -> aSource

An URL to documentation.

nameurl :: String -> String -> aSource

A named URL to documentation. First argument is the name of the link, second argument the URL.

Instances

class Documentable a => DocList a whereSource

Documentable types with lists.

Methods

ulist :: [a] -> aSource

Unordered list.

elist :: [a] -> aSource

Enumerated list.

Instances