Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone

Util.Doc

Contents

Description

Utilities for the Doc type.

Synopsis

Documentation

newtype Doc Source #

This is for documentation text. It can contain some simple markdown-like formatting, which may be either be printed directly, or formatted via html_doc.

Constructors

Doc Text 
Instances
Eq Doc # 
Instance details

Defined in Util.Doc

Methods

(==) :: Doc -> Doc -> Bool #

(/=) :: Doc -> Doc -> Bool #

Ord Doc # 
Instance details

Defined in Util.Doc

Methods

compare :: Doc -> Doc -> Ordering #

(<) :: Doc -> Doc -> Bool #

(<=) :: Doc -> Doc -> Bool #

(>) :: Doc -> Doc -> Bool #

(>=) :: Doc -> Doc -> Bool #

max :: Doc -> Doc -> Doc #

min :: Doc -> Doc -> Doc #

Show Doc # 
Instance details

Defined in Util.Doc

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String.String #

showList :: [Doc] -> ShowS #

String.IsString Doc # 
Instance details

Defined in Util.Doc

Semigroup Doc # 
Instance details

Defined in Util.Doc

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Monoid Doc # 
Instance details

Defined in Util.Doc

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

TextUtil.Textlike Doc # 
Instance details

Defined in Util.Doc

Pretty.Pretty Doc # 
Instance details

Defined in Util.Doc

Serialize.Serialize Doc # 
Instance details

Defined in Util.Doc

pretty :: Pretty.Pretty a => a -> Doc Source #

This probably doesn't belong here, but it's useful in the same contexts as doc.

HTML

newtype Html Source #

Constructors

Html Text 
Instances
Eq Html # 
Instance details

Defined in Util.Doc

Methods

(==) :: Html -> Html -> Bool #

(/=) :: Html -> Html -> Bool #

Ord Html # 
Instance details

Defined in Util.Doc

Methods

compare :: Html -> Html -> Ordering #

(<) :: Html -> Html -> Bool #

(<=) :: Html -> Html -> Bool #

(>) :: Html -> Html -> Bool #

(>=) :: Html -> Html -> Bool #

max :: Html -> Html -> Html #

min :: Html -> Html -> Html #

Show Html # 
Instance details

Defined in Util.Doc

String.IsString Html # 
Instance details

Defined in Util.Doc

Semigroup Html # 
Instance details

Defined in Util.Doc

Methods

(<>) :: Html -> Html -> Html #

sconcat :: NonEmpty Html -> Html #

stimes :: Integral b => b -> Html -> Html #

Monoid Html # 
Instance details

Defined in Util.Doc

Methods

mempty :: Html #

mappend :: Html -> Html -> Html #

mconcat :: [Html] -> Html #

TextUtil.Textlike Html # 
Instance details

Defined in Util.Doc

Pretty.Pretty Html # 
Instance details

Defined in Util.Doc

create

html_doc :: HtmlState -> Doc -> Html Source #

Format a Doc to HTML. Interpret simple markdown-like formatting: single quotes for a reference to function or module haddock, backticks for <code>, and newline for <br>.

TODO maybe support leading - for <ol>.

type HtmlState = (FilePath, Set FilePath) Source #

(haddock_dir, directory_tree)