hscolour-1.12: Colourise Haskell code.Source codeContentsIndex
Language.Haskell.HsColour
Description

This is a library which colourises Haskell code. It currently has five output formats:

  • ANSI terminal codes
  • LaTeX macros
  • HTML with font tags
  • HTML with CSS.
  • mIRC chat client colour codes.
Synopsis
data Output
= TTY
| LaTeX
| HTML
| CSS
| 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 -> Literate -> String -> String -> String
Documentation
data Output Source
The supported output formats.
Constructors
TTYANSI terminal codes
LaTeXTeX macros
HTMLHTML with font tags
CSSHTML with CSS.
MIRCmIRC chat clients
show/hide Instances
data ColourPrefs Source
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]
show/hide Instances
hscolourSource
:: OutputOutput format.
-> ColourPrefsColour preferences (for formats that support them).
-> BoolWhether to include anchors.
-> BoolWhether output document is partial or complete.
-> LiterateWhether input document is literate haskell or not
-> StringTitle for output.
-> StringHaskell source code.
-> StringColoured Haskell source code.
Colourise Haskell source code with the given output format.
Produced by Haddock version 2.6.0