highlighting-kate-0.6.4: Syntax highlighting

CopyrightCopyright (C) 2008 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Text.Highlighting.Kate.Types

Description

Definitions for data structures needed by highlighting-kate.

Synopsis

Documentation

type Context = (String, String) Source #

A context: pair of syntax name and context name.

type ContextStack = [Context] Source #

A stack of contexts. (Language-specific context stacks must be maintained because of IncludeRules.)

data SyntaxState Source #

State for syntax parser.

Constructors

SyntaxState 

Fields

type Token = (TokenType, String) Source #

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

data TokenType Source #

Instances
Enum TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Eq TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Data TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TokenType -> c TokenType Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TokenType Source #

toConstr :: TokenType -> Constr Source #

dataTypeOf :: TokenType -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TokenType) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenType) Source #

gmapT :: (forall b. Data b => b -> b) -> TokenType -> TokenType Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TokenType -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TokenType -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> TokenType -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TokenType -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TokenType -> m TokenType Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenType -> m TokenType Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenType -> m TokenType Source #

Read TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Show TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

type SourceLine = [Token] Source #

A line of source, list of labeled source items.

data TokenStyle Source #

Instances
Data TokenStyle Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TokenStyle -> c TokenStyle Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TokenStyle Source #

toConstr :: TokenStyle -> Constr Source #

dataTypeOf :: TokenStyle -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TokenStyle) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenStyle) Source #

gmapT :: (forall b. Data b => b -> b) -> TokenStyle -> TokenStyle Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TokenStyle -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TokenStyle -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> TokenStyle -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TokenStyle -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source #

Read TokenStyle Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Show TokenStyle Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

data Color Source #

Constructors

RGB Word8 Word8 Word8 
Instances
Data Color Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Color -> c Color Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Color Source #

toConstr :: Color -> Constr Source #

dataTypeOf :: Color -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Color) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Color) Source #

gmapT :: (forall b. Data b => b -> b) -> Color -> Color Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Color -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Color -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Color -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Color -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Color -> m Color Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Color -> m Color Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Color -> m Color Source #

Read Color Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Show Color Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

class ToColor a where Source #

Methods

toColor :: a -> Maybe Color Source #

Instances
ToColor Int Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

toColor :: Int -> Maybe Color Source #

ToColor String Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

ToColor (Double, Double, Double) Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

ToColor (Word8, Word8, Word8) Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

class FromColor a where Source #

Methods

fromColor :: Color -> a Source #

Instances
FromColor String Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

FromColor (Double, Double, Double) Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

FromColor (Word8, Word8, Word8) Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

data Style Source #

Instances
Data Style Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style Source #

toConstr :: Style -> Constr Source #

dataTypeOf :: Style -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) Source #

gmapT :: (forall b. Data b => b -> b) -> Style -> Style Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

Read Style Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Show Style Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

data FormatOptions Source #

Options for formatting source code.

Constructors

FormatOptions 

Fields