HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleskylighting-0.14.1.2Haskell2010

Skylighting

  • 22 types
  • 2 classes
  • 44 values
datadata Syntax
#

A syntax corresponds to a complete Kate syntax description. The sShortname field is derived from the filename.

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata Matcher
#
Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata ANSIColorLevel
#

The available levels of color complexity in ANSI terminal output.

Constructors

Instances10Bounded, Enum, Eq, Data, Ord, Read, …
datadata ContextSwitch
#

A context switch, either pops or pushes a context.

Constructors

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata KeywordAttr
#

Attributes controlling how keywords are interpreted.

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata ListItem
#

A list item is either just a textual value or an included list. IncludeList (x,y) includes list y from syntax with full name x.

Constructors

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata WordSet a
#

A set of "words," possibly case insensitive.

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata Style
#

A rendering style. This determines how each kind of token is to be rendered, and sets a default color and background color for normal tokens. Line numbers can have a different color and background color.

Instances10Eq, Data, Ord, Read, Show, Generic, …
datadata TokenStyle
#

A TokenStyle determines how a token is to be rendered.

Instances10Eq, Data, Ord, Read, Show, Generic, …
datadata TokenType
#
Instances14Bounded, Enum, Eq, Data, Ord, Read, …
datadata Color
#

A color (red, green, blue).

Constructors

Instances10Eq, Data, Ord, Read, Show, Generic, …
datadata Context
#

A Context corresponds to a context element in a Kate syntax description.

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata FormatOptions
#

Options for formatting source code.

Constructors

Instances8Eq, Data, Ord, Read, Show, Generic, …
datadata Rule
#

A rule corresponds to one of the elements of a Kate syntax highlighting "context."

Instances8Eq, Data, Ord, Read, Show, Generic, …
classclass FromColor a where
#

Different representations of a Color.

Methods

Instances6FromColor
  • FromColor StringDefined in skylighting-core-0.14.1.2 · Skylighting.Types
  • FromColor Xterm256ColorCodeDefined in skylighting-format-ansi-0.1 · Skylighting.Format.ANSI

    Warning: this conversion is noticeably approximate!

  • (Ord a, Floating a) => FromColor (Colour a)Defined in skylighting-core-0.14.1.2 · Skylighting.Types
  • FromColor (ColorIntensity, Color)Defined in skylighting-format-ansi-0.1 · Skylighting.Format.ANSI · orphan

    Warning: this conversion is extremely approximate!

  • FromColor (Word8, Word8, Word8)Defined in skylighting-core-0.14.1.2 · Skylighting.Types
  • FromColor (Double, Double, Double)Defined in skylighting-core-0.14.1.2 · Skylighting.Types
classclass ToColor a where
#

Things that can be converted to a color.

Methods

Instances7ToColor, …
newtypenewtype LineNo
#

Line numbers

Constructors

Instances2Enum, Show
  • Enum LineNoDefined in skylighting-core-0.14.1.2 · Skylighting.Types
  • Show LineNoDefined in skylighting-core-0.14.1.2 · Skylighting.Types
typetype ContextName = (Text, Text)
#

Full name of a context: the first member of the pair is the full syntax name, the second the context name within that syntax.

typetype Token = (TokenType, Text)
#

A pair consisting of a list of attributes and some text.

valuemissingIncludes :: [Syntax] -> [(Text, Text)]
#

Scan a list of Syntaxs and make sure that IncludeRules never asks for a syntax not in this list. Produces a list of pairs where the first element is the including syntax name and the second element is the (missing) included syntax name. This is intended for sanity checks to avoid run-time errors.

datadata Regex
#
Instances3Show, Semigroup, Monoid
  • Show RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
  • Semigroup RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
  • Monoid RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
datadata RE
#

A representation of a regular expression.

Instances8Eq, Data, Ord, Read, Show, Binary, …
  • Eq REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Data REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Ord REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Read REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Show REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Binary REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • FromJSON REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • ToJSON REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex

Match a Regex against a (presumed UTF-8 encoded) ByteString, returning the matched text and a map of (offset, size) pairs for captures. Note that all matches are from the beginning of the string (a ^ anchor is implicit). Note also that to avoid pathological performance in certain cases, the matcher is limited to considering 2000 possible matches at a time; when that threshold is reached, it discards smaller matches. Hence certain regexes may incorrectly fail to match: e.g. a*a{3000}$ on a string of 3000 as.

valuebreezeDark :: Style
#

Style from the breeze-dark KDE syntax highlighting theme.

valueespresso :: Style
#

Style based on ultraviolet's espresso_libre.css (dark background).

valuehaddock :: Style
#

Style based on haddock's source highlighting.

valuekate :: Style
#

Style based on kate's default colors.

valuetango :: Style
#

Style based on pygments's tango colors.

valuezenburn :: Style
#

Style based on the popular zenburn vim color scheme

Format tokens as a ConTeXt highlighting typing environment. The highlighting environemnt is defined by the macros produced by styleToConTeXt; it is a typing environment with default escaping enabled, i.e., / is the escape character.

valuestyleToConTeXt :: Style -> Text
#

Converts a Style to a set of ConTeXt command definitions, which should be placed in the document's preamble.

Format tokens as an HTML pre block. Each line is wrapped in an a element with the class ‘source-line’. If line numbering is selected, the surrounding pre is given the class ‘numberSource’, and the resulting html will display line numbers thanks to the included CSS. See the documentation for formatHtmlInline for information about how tokens are encoded.

Format tokens using HTML spans inside code tags. For example, A KeywordTok is rendered as a span with class kw. Short class names correspond to TokenTypes as follows: KeywordTok = kw, DataTypeTok = dt, DecValTok = dv, BaseNTok = bn, FloatTok = fl, CharTok = ch, StringTok = st, CommentTok = co, OtherTok = ot, AlertTok = al, FunctionTok = fu, RegionMarkerTok = re, ErrorTok = er, ConstantTok = cn, SpecialCharTok = sc, VerbatimStringTok = vs, SpecialStringTok = ss, ImportTok = im, DocumentationTok = do, AnnotationTok = an, CommentVarTok = cv, VariableTok = va, ControlFlowTok = cf, OperatorTok = op, BuiltInTok = bu, ExtensionTok = ex, PreprocessorTok = pp, AttributeTok = at, InformationTok = in, WarningTok = wa. A NormalTok is not marked up at all.

valuestyleToCss :: Style -> String
#

Returns CSS for styling highlighted code according to the given style.

Format tokens as a LaTeX Highlighting environment inside a Shaded environment. Highlighting and Shaded are defined by the macros produced by styleToLaTeX. Highlighting is a verbatim environment using fancyvrb; \, {, and } have their normal meanings inside this environment, so that formatting commands work. Shaded is either nothing (if the style's background color is default) or a snugshade environment from framed, providing a background color for the whole code block, even if it spans multiple pages.

Formats tokens as LaTeX using custom commands inside | characters. Assumes that | is defined as a short verbatim command by the macros produced by styleToLaTeX. A KeywordTok is rendered using \KeywordTok{..}, and so on.

valuestyleToLaTeX :: Style -> Text
#

Converts a Style to a set of LaTeX macro definitions, which should be placed in the document's preamble. Note: default LaTeX setup doesn't allow boldface typewriter font. To make boldface work in styles, you need to use a different typewriter font. This will work for computer modern:

\DeclareFontShape{OT1}{cmtt}{bx}{n}{<5><6><7><8><9><10><10.95><12><14.4><17.28><20.74><24.88>cmttb10}{}

Or, with xelatex:

\usepackage{fontspec}
\setmainfont[SmallCapsFont={* Caps}]{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont[SmallCapsFont={Latin Modern Mono Caps}]{Latin Modern Mono Light}

Loads all syntax definitions from the specified directory by looking for files with an ".xml" extension. This function assumes such files are Kate XML syntax definitions, so XML files with unexpected contents will cause a parsing error returned as a Left.