HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulehscolour-1.25Haskell98

Language.Haskell.HsColour

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.

  • 2 types
  • 1 value
  • Packagehscolour-1.25
  • Exports3
  • LanguageHaskell98
  • LicenceLicenseRef-LGPL
  • SourceHsColour.hs
datadata Output
#

The supported output formats.

Constructors

Instances2Eq, Show
  • Eq OutputDefined in hscolour-1.25 · Language.Haskell.HsColour.Output
  • Show OutputDefined in hscolour-1.25 · Language.Haskell.HsColour.Output
datadata ColourPrefs
#
Instances3Eq, Read, Show
  • Eq ColourPrefsDefined in hscolour-1.25 · Language.Haskell.HsColour.Colourise
  • Read ColourPrefsDefined in hscolour-1.25 · Language.Haskell.HsColour.Colourise
  • Show ColourPrefsDefined in hscolour-1.25 · Language.Haskell.HsColour.Colourise
valuehscolour
  1. :: Output

    Output format.

  2. -> ColourPrefs

    Colour preferences (for formats that support them).

  3. -> Bool

    Whether to include anchors.

  4. -> Bool

    Whether output document is partial or complete.

  5. -> String

    Title for output.

  6. -> Bool

    Whether input document is literate haskell or not

  7. -> String

    Haskell source code.

  8. -> String

    Coloured Haskell source code.

#

Colourise Haskell source code with the given output format.