hscolourSource codeContentsIndex
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, keyglyph, layout, comment, conid, varid, conop, varop, string, char, number, cpp, selection, variantselection, definition :: [Highlight]
}
hscolour :: Output -> ColourPrefs -> Bool -> Bool -> String -> Bool -> String -> String
Documentation
data Output Source
The supported output formats.
Constructors
TTYANSI terminal codes
LaTeXTeX macros
HTMLHTML with font tags
CSSHTML with CSS.
ICSSHTML with inline CSS.
MIRCmIRC chat clients
show/hide Instances
Eq Output
Show Output
data ColourPrefs Source
Colour preferences.
Constructors
ColourPrefs
keyword, keyglyph, layout, comment, conid, varid, conop, varop, string, char, number, cpp, selection, variantselection, definition :: [Highlight]
show/hide Instances
hscolourSource
:: OutputOutput format.
-> ColourPrefsColour preferences (for formats that support them).
-> BoolWhether to include anchors.
-> BoolWhether output document is partial or complete.
-> StringTitle for output.
-> BoolWhether input document is literate haskell or not
-> StringHaskell source code.
-> StringColoured Haskell source code.
Colourise Haskell source code with the given output format.
Produced by Haddock version 0.8