hscolour-1.25: Colourise Haskell code.

Safe Haskell | Safe-Inferred
Language | Haskell98

Language.Haskell.HsColour.Colourise

Synopsis

- module Language.Haskell.HsColour.ColourHighlight
- 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]
  }
- readColourPrefs :: IO ColourPrefs
- defaultColourPrefs :: ColourPrefs
- colourise :: ColourPrefs -> TokenType -> [Highlight]

# Documentation

module Language.Haskell.HsColour.ColourHighlight

data ColourPrefs Source #

Colour preferences.

Constructors

ColourPrefs |

Fields

- 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

Instances details

Read ColourPrefs Source # |
Instance details Defined in Language.Haskell.HsColour.Colourise Methods readsPrec :: Int -> ReadS ColourPrefs Source # readList :: ReadS [ColourPrefs] Source # readPrec :: ReadPrec ColourPrefs Source # readListPrec :: ReadPrec [ColourPrefs] Source #
Show ColourPrefs Source # |
Instance details Defined in Language.Haskell.HsColour.Colourise Methods showsPrec :: Int -> ColourPrefs -> ShowS Source # show :: ColourPrefs -> String Source # showList :: [ColourPrefs] -> ShowS Source #
Eq ColourPrefs Source # |
Instance details Defined in Language.Haskell.HsColour.Colourise Methods (==) :: ColourPrefs -> ColourPrefs -> Bool Source # (/=) :: ColourPrefs -> ColourPrefs -> Bool Source #

readColourPrefs :: IO ColourPrefs Source #

Read colour preferences from .hscolour file in the current directory, or failing that, from $HOME/.hscolour, and failing that, returns a default set of prefs.

defaultColourPrefs :: ColourPrefs Source #

colourise :: ColourPrefs -> TokenType -> [Highlight] Source #

Convert token classification to colour highlights.