Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

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 # 

Methods

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

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

Ord 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 # 

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String.String #

showList :: [Doc] -> ShowS #

String.IsString Doc # 
Monoid Doc # 

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Pretty.Pretty Doc # 
TextUtil.Textlike Doc # 
Serialize.Serialize 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 # 

Methods

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

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

Ord Html # 

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 # 
String.IsString Html # 
Monoid Html # 

Methods

mempty :: Html #

mappend :: Html -> Html -> Html #

mconcat :: [Html] -> Html #

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)