-- 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.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

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.General
dropLast :: Eq a => a -> [a] -> [a]
dropFirst :: Eq a => a -> [a] -> [a]

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.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.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


-- | 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

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)]


-- | 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 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


-- | 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


-- | 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 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


-- | 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
