Language.Haskell.HsColour

| hscolour-1.17: Colourise Haskell code. | Contents | Index
Language.Haskell.HsColour
Description
This is a library which colourises Haskell code. It currently has six output formats: ANSI terminal codes LaTeX macros HTML 3.2 with font tags HTML 4.01 with external CSS. XHTML 1.0 with internal CSS. mIRC chat client colour codes.
Synopsis
data Output
= TTY
| LaTeX
| HTML
| CSS
| ICSS
| MIRC
data ColourPrefs = ColourPrefs {
keyword :: [Highlight]
keyglyph :: [Highlight]
layout :: [Highlight]
comment :: [Highlight]
conid :: [Highlight]
varid :: [Highlight]
conop :: [Highlight]
varop :: [Highlight]
string :: [Highlight]
char :: [Highlight]
number :: [Highlight]
cpp :: [Highlight]
selection :: [Highlight]
variantselection :: [Highlight]
definition :: [Highlight]
}
hscolour :: Output -> ColourPrefs -> Bool -> Bool -> String -> Bool -> String -> String
Documentation
data Output
The supported output formats.
Constructors
TTY | ANSI terminal codes
LaTeX | TeX macros
HTML | HTML with font tags
CSS | HTML with CSS.
ICSS | HTML with inline CSS.
MIRC | mIRC chat clients
Instances
Eq Output |
Show Output |
data ColourPrefs
Colour preferences.
Constructors
ColourPrefs |
keyword :: [Highlight] |
keyglyph :: [Highlight] |
layout :: [Highlight] |
comment :: [Highlight] |
conid :: [Highlight] |
varid :: [Highlight] |
conop :: [Highlight] |
varop :: [Highlight] |
string :: [Highlight] |
char :: [Highlight] |
number :: [Highlight] |
cpp :: [Highlight] |
selection :: [Highlight] |
variantselection :: [Highlight] |
definition :: [Highlight] |
Instances
Eq ColourPrefs |
Read ColourPrefs |
Show ColourPrefs |
hscolour
:: Output | Output format.
-> ColourPrefs | Colour preferences (for formats that support them).
-> Bool | Whether to include anchors.
-> Bool | Whether output document is partial or complete.
-> String | Title for output.
-> Bool | Whether input document is literate haskell or not
-> String | Haskell source code.
-> String | Coloured Haskell source code.
Colourise Haskell source code with the given output format.
Produced by Haddock version 2.7.2