This file is indexed.

/usr/share/doc/libghc-hscolour-doc/html/hscolour.txt is in libghc-hscolour-doc 1.24.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Colourise Haskell code.
--   
--   hscolour is a small Haskell script to colourise Haskell code. It
--   currently has six output formats: ANSI terminal codes (optionally
--   XTerm-256colour codes), HTML 3.2 with <a>font</a> tags, HTML 4.01 with
--   CSS, HTML 4.01 with CSS and mouseover annotations, XHTML 1.0 with
--   inline CSS styling, LaTeX, and mIRC chat codes.
@package hscolour
@version 1.24.1

module Language.Haskell.HsColour.General
dropLast :: Eq a => a -> [a] -> [a]
dropFirst :: Eq a => a -> [a] -> [a]

module Language.Haskell.HsColour.Classify

-- | Classification of tokens as lexical entities
data TokenType
Space :: TokenType
Keyword :: TokenType
Keyglyph :: TokenType
Layout :: TokenType
Comment :: TokenType
Conid :: TokenType
Varid :: TokenType
Conop :: TokenType
Varop :: TokenType
String :: TokenType
Char :: TokenType
Number :: TokenType
Cpp :: TokenType
Error :: TokenType
Definition :: TokenType

-- | Lex Haskell source code into an annotated token stream, without
--   discarding any characters or layout.
tokenise :: String -> [(TokenType, String)]
instance GHC.Show.Show Language.Haskell.HsColour.Classify.TokenType
instance GHC.Classes.Eq Language.Haskell.HsColour.Classify.TokenType

module Language.Haskell.HsColour.Anchors

-- | <a>insertAnchors</a> places an anchor marker in the token stream
--   before the first defining occurrence of any identifier. Here,
--   <i>before</i> means immediately preceding its type signature, or
--   preceding a (haddock) comment that comes immediately before the type
--   signature, or failing either of those, before the first equation.
insertAnchors :: [(TokenType, String)] -> [Either Anchor (TokenType, String)]

module Language.Haskell.HsColour.ColourHighlight

-- | Colours supported by ANSI codes.
data Colour
Black :: Colour
Red :: Colour
Green :: Colour
Yellow :: Colour
Blue :: Colour
Magenta :: Colour
Cyan :: Colour
White :: Colour
Rgb :: Word8 -> Word8 -> Word8 -> Colour

-- | Types of highlighting supported by ANSI codes (and some extra styles).
data Highlight
Normal :: Highlight
Bold :: Highlight
Dim :: Highlight
Underscore :: Highlight
Blink :: Highlight
ReverseVideo :: Highlight
Concealed :: Highlight
Foreground :: Colour -> Highlight
Background :: Colour -> Highlight
Italic :: Highlight

-- | Convert an integer in the range [0,2^24-1] to its base 256-triplet,
--   passing the result to the given continuation (avoid unnecessary
--   tupleism).
base256 :: Integral int => (Word8 -> Word8 -> Word8 -> r) -> int -> r

-- | Convert a three-digit numeral in the given (as arg 1) base to its
--   integer value.
unbase :: Integral int => int -> Word8 -> Word8 -> Word8 -> int

-- | Approximate a 24-bit Rgb colour with a colour in the xterm256 6x6x6
--   colour cube, returning its index.
rgb24bit_to_xterm256 :: (Integral t) => Word8 -> Word8 -> Word8 -> t

-- | Ap"proxi"mate a 24-bit Rgb colour with an ANSI8 colour. Will leave
--   other colours unchanged and will never return an <a>Rgb</a>
--   constructor value.
projectToBasicColour8 :: Colour -> Colour

-- | Lift <a>projectToBasicColour8</a> to <a>Highlight</a>s
hlProjectToBasicColour8 :: Highlight -> Highlight
instance GHC.Read.Read Language.Haskell.HsColour.ColourHighlight.Highlight
instance GHC.Show.Show Language.Haskell.HsColour.ColourHighlight.Highlight
instance GHC.Classes.Eq Language.Haskell.HsColour.ColourHighlight.Highlight
instance GHC.Read.Read Language.Haskell.HsColour.ColourHighlight.Colour
instance GHC.Show.Show Language.Haskell.HsColour.ColourHighlight.Colour
instance GHC.Classes.Eq Language.Haskell.HsColour.ColourHighlight.Colour
instance GHC.Enum.Enum Language.Haskell.HsColour.ColourHighlight.Colour

module Language.Haskell.HsColour.Output
data TerminalType

-- | <tt>\033[Xm</tt>-style escape sequences (with <i>X</i> =~ [34][0-7])
Ansi16Colour :: TerminalType

-- | <a>Ansi16Colour</a>, and also <tt>\033[Y8;5;Zm]</tt>-style escape
--   sequences (with <i>Y</i> =~ [3,4] and <i>Z</i> an integer in [0,255]
--   with the XTerm colour cube semantics).
XTerm256Compatible :: TerminalType

-- | The supported output formats.
data Output

-- | ANSI terminal codes. Equivalent to <a>TTYg</a> <a>Ansi16Colour</a> but
--   left in for backwards compatibility.
TTY :: Output

-- | Terminal codes appropriate for the <a>TerminalType</a>.
TTYg :: TerminalType -> Output

-- | TeX macros
LaTeX :: Output

-- | HTML with font tags
HTML :: Output

-- | HTML with CSS.
CSS :: Output

-- | HTML with CSS and mouseover types.
ACSS :: Output

-- | HTML with inline CSS.
ICSS :: Output

-- | mIRC chat clients
MIRC :: Output
instance GHC.Show.Show Language.Haskell.HsColour.Output.Output
instance GHC.Classes.Eq Language.Haskell.HsColour.Output.Output
instance GHC.Classes.Ord Language.Haskell.HsColour.Output.TerminalType
instance GHC.Classes.Eq Language.Haskell.HsColour.Output.TerminalType
instance GHC.Show.Show Language.Haskell.HsColour.Output.TerminalType


-- | Partially taken from Hugs AnsiScreen.hs library:
module Language.Haskell.HsColour.ANSI
highlightOnG :: TerminalType -> [Highlight] -> String

-- | <h1><a>highlightOn</a> <a>Ansi16Colour</a></h1>
highlightOn :: [Highlight] -> String
highlightOff :: [Char]

-- | Make the given string appear with all of the listed highlights
highlightG :: TerminalType -> [Highlight] -> String -> String

-- | <h1><a>highlightG</a> <a>Ansi16Colour</a></h1>
highlight :: [Highlight] -> String -> String
cleareol :: [Char]
clearbol :: [Char]
clearline :: [Char]
clearDown :: [Char]
clearUp :: [Char]

-- | Clear the screen.
cls :: String

-- | Move the screen cursor to the given position.
goto :: Int -> Int -> String
cursorUp :: [Char]
cursorDown :: [Char]
cursorLeft :: [Char]
cursorRight :: [Char]
savePosition :: [Char]
restorePosition :: [Char]

-- | Types of highlighting supported by ANSI codes (and some extra styles).
data Highlight
Normal :: Highlight
Bold :: Highlight
Dim :: Highlight
Underscore :: Highlight
Blink :: Highlight
ReverseVideo :: Highlight
Concealed :: Highlight
Foreground :: Colour -> Highlight
Background :: Colour -> Highlight
Italic :: Highlight

-- | Colours supported by ANSI codes.
data Colour
Black :: Colour
Red :: Colour
Green :: Colour
Yellow :: Colour
Blue :: Colour
Magenta :: Colour
Cyan :: Colour
White :: Colour
Rgb :: Word8 -> Word8 -> Word8 -> Colour

-- | An infinite supply of colours.
colourCycle :: [Colour]

-- | Scrolling
enableScrollRegion :: Int -> Int -> String
scrollUp :: String
scrollDown :: String
lineWrap :: Bool -> [Char]
data TerminalType

-- | <tt>\033[Xm</tt>-style escape sequences (with <i>X</i> =~ [34][0-7])
Ansi16Colour :: TerminalType

-- | <a>Ansi16Colour</a>, and also <tt>\033[Y8;5;Zm]</tt>-style escape
--   sequences (with <i>Y</i> =~ [3,4] and <i>Z</i> an integer in [0,255]
--   with the XTerm colour cube semantics).
XTerm256Compatible :: TerminalType
instance GHC.Enum.Enum Language.Haskell.HsColour.ColourHighlight.Highlight

module Language.Haskell.HsColour.Options

-- | Command-line options
data Option

-- | print usage message
Help :: Option

-- | report version
Version :: Option

-- | report auxiliary information, e.g. CSS defaults
Information :: Option

-- | what type of output to produce
Format :: Output -> Option

-- | literate input (i.e. multiple embedded fragments)
LHS :: Bool -> Option

-- | whether to add anchors
Anchors :: Bool -> Option

-- | whether to produce a full document or partial
Partial :: Bool -> Option

-- | input source file
Input :: FilePath -> Option

-- | output source file
Output :: FilePath -> Option

-- | annotations file
Annot :: FilePath -> Option

-- | The supported output formats.
data Output

-- | ANSI terminal codes. Equivalent to <a>TTYg</a> <a>Ansi16Colour</a> but
--   left in for backwards compatibility.
TTY :: Output

-- | Terminal codes appropriate for the <a>TerminalType</a>.
TTYg :: TerminalType -> Output

-- | TeX macros
LaTeX :: Output

-- | HTML with font tags
HTML :: Output

-- | HTML with CSS.
CSS :: Output

-- | HTML with CSS and mouseover types.
ACSS :: Output

-- | HTML with inline CSS.
ICSS :: Output

-- | mIRC chat clients
MIRC :: Output
data TerminalType

-- | <tt>\033[Xm</tt>-style escape sequences (with <i>X</i> =~ [34][0-7])
Ansi16Colour :: TerminalType

-- | <a>Ansi16Colour</a>, and also <tt>\033[Y8;5;Zm]</tt>-style escape
--   sequences (with <i>Y</i> =~ [3,4] and <i>Z</i> an integer in [0,255]
--   with the XTerm colour cube semantics).
XTerm256Compatible :: TerminalType
instance GHC.Classes.Eq Language.Haskell.HsColour.Options.Option

module Language.Haskell.HsColour.Colourise

-- | Colour preferences.
data ColourPrefs
ColourPrefs :: [Highlight] -> ColourPrefs
[keyword, keyglyph, layout, comment, conid, varid, conop, varop, string, char, number, cpp, selection, variantselection, definition] :: ColourPrefs -> [Highlight]

-- | 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.
readColourPrefs :: IO ColourPrefs
defaultColourPrefs :: ColourPrefs

-- | Convert token classification to colour highlights.
colourise :: ColourPrefs -> TokenType -> [Highlight]
instance GHC.Read.Read Language.Haskell.HsColour.Colourise.ColourPrefs
instance GHC.Show.Show Language.Haskell.HsColour.Colourise.ColourPrefs
instance GHC.Classes.Eq Language.Haskell.HsColour.Colourise.ColourPrefs


-- | Highlights Haskell code with ANSI terminal codes.
module Language.Haskell.HsColour.TTY

-- | <h1><a>hscolourG</a> <a>Ansi16Colour</a></h1>
hscolour :: ColourPrefs -> String -> String

-- | Highlights Haskell code with ANSI terminal codes.
hscolourG :: TerminalType -> ColourPrefs -> String -> [Char]


-- | Formats Haskell source code using HTML with font tags.
module Language.Haskell.HsColour.HTML

-- | Formats Haskell source code using HTML with font tags.
hscolour :: ColourPrefs -> Bool -> Int -> String -> String
top'n'tail :: String -> String -> String
renderAnchors :: (a -> String) -> Either String a -> String
renderComment :: String -> String
renderNewLinesAnchors :: Int -> String -> String
escape :: String -> String


-- | Formats Haskell source code as HTML with CSS.
module Language.Haskell.HsColour.CSS

-- | Formats Haskell source code as a complete HTML document with CSS.
hscolour :: Bool -> Int -> String -> String
top'n'tail :: String -> String -> String
renderToken :: (TokenType, String) -> String
pre :: String -> String


-- | Formats Haskell source code as HTML with CSS and Mouseover Type
--   Annotations
module Language.Haskell.HsColour.ACSS

-- | Formats Haskell source code using HTML and mouse-over annotations
hscolour :: Bool -> Int -> String -> String

-- | Formats Haskell source code using HTML and mouse-over annotations
hsannot :: Bool -> Int -> (String, AnnMap) -> String
newtype AnnMap
Ann :: (Map Loc (String, String)) -> AnnMap
newtype Loc
L :: (Int, Int) -> Loc
breakS :: [Char]
srcModuleName :: String -> String
instance GHC.Show.Show Language.Haskell.HsColour.ACSS.Loc
instance GHC.Classes.Ord Language.Haskell.HsColour.ACSS.Loc
instance GHC.Classes.Eq Language.Haskell.HsColour.ACSS.Loc
instance GHC.Show.Show Language.Haskell.HsColour.ACSS.AnnMap


-- | Formats Haskell source code as HTML with inline CSS.
module Language.Haskell.HsColour.InlineCSS

-- | Formats Haskell source code as a complete HTML document with inline
--   styling
hscolour :: ColourPrefs -> Bool -> Int -> String -> String
top'n'tail :: String -> String -> String


-- | Formats Haskell source code using LaTeX macros.
module Language.Haskell.HsColour.LaTeX

-- | Formats Haskell source code as a complete LaTeX document.
hscolour :: ColourPrefs -> String -> String
top'n'tail :: String -> String -> String


-- | Formats Haskell source code using mIRC codes. (see
--   http://irssi.org/documentation/formats)
module Language.Haskell.HsColour.MIRC

-- | Formats Haskell source code using mIRC codes.
hscolour :: ColourPrefs -> String -> String


-- | This is a library which colourises Haskell code. It currently has six
--   output formats:
--   
--   <ul>
--   <li>ANSI terminal codes</li>
--   <li>LaTeX macros</li>
--   <li>HTML 3.2 with font tags</li>
--   <li>HTML 4.01 with external CSS.</li>
--   <li>XHTML 1.0 with internal CSS.</li>
--   <li>mIRC chat client colour codes.</li>
--   </ul>
module Language.Haskell.HsColour

-- | The supported output formats.
data Output

-- | ANSI terminal codes. Equivalent to <a>TTYg</a> <a>Ansi16Colour</a> but
--   left in for backwards compatibility.
TTY :: Output

-- | Terminal codes appropriate for the <a>TerminalType</a>.
TTYg :: TerminalType -> Output

-- | TeX macros
LaTeX :: Output

-- | HTML with font tags
HTML :: Output

-- | HTML with CSS.
CSS :: Output

-- | HTML with CSS and mouseover types.
ACSS :: Output

-- | HTML with inline CSS.
ICSS :: Output

-- | mIRC chat clients
MIRC :: Output

-- | Colour preferences.
data ColourPrefs
ColourPrefs :: [Highlight] -> ColourPrefs
[keyword, keyglyph, layout, comment, conid, varid, conop, varop, string, char, number, cpp, selection, variantselection, definition] :: ColourPrefs -> [Highlight]

-- | Colourise Haskell source code with the given output format.
hscolour :: Output -> ColourPrefs -> Bool -> Bool -> String -> Bool -> String -> String
instance GHC.Show.Show Language.Haskell.HsColour.Lit