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

Instances
Show SyntaxState Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> SyntaxState -> ShowS

show :: SyntaxState -> String

showList :: [SyntaxState] -> ShowS

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

Methods

(==) :: TokenType -> TokenType -> Bool

(/=) :: TokenType -> TokenType -> Bool

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

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

toConstr :: TokenType -> Constr

dataTypeOf :: TokenType -> DataType

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

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

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

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

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

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

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

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

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

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

Read TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

readsPrec :: Int -> ReadS TokenType

readList :: ReadS [TokenType]

readPrec :: ReadPrec TokenType

readListPrec :: ReadPrec [TokenType]

Show TokenType Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> TokenType -> ShowS

show :: TokenType -> String

showList :: [TokenType] -> ShowS

type SourceLine = [Token] Source #

A line of source, list of labeled source items.

type KateParser = GenParser Char SyntaxState Source #

data TokenStyle Source #

Constructors

TokenStyle 

Fields

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

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

toConstr :: TokenStyle -> Constr

dataTypeOf :: TokenStyle -> DataType

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

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

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

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

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

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

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

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

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

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

Read TokenStyle Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

readsPrec :: Int -> ReadS TokenStyle

readList :: ReadS [TokenStyle]

readPrec :: ReadPrec TokenStyle

readListPrec :: ReadPrec [TokenStyle]

Show TokenStyle Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> TokenStyle -> ShowS

show :: TokenStyle -> String

showList :: [TokenStyle] -> ShowS

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

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

toConstr :: Color -> Constr

dataTypeOf :: Color -> DataType

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

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

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

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

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

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

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

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

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

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

Read Color Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

readsPrec :: Int -> ReadS Color

readList :: ReadS [Color]

readPrec :: ReadPrec Color

readListPrec :: ReadPrec [Color]

Show Color Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> Color -> ShowS

show :: Color -> String

showList :: [Color] -> ShowS

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

Methods

toColor :: String -> Maybe Color Source #

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

Defined in Text.Highlighting.Kate.Types

Methods

toColor :: (Double, Double, Double) -> Maybe Color Source #

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

Defined in Text.Highlighting.Kate.Types

Methods

toColor :: (Word8, Word8, Word8) -> Maybe Color Source #

class FromColor a where Source #

Methods

fromColor :: Color -> a Source #

Instances
FromColor String Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

fromColor :: Color -> String Source #

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

Defined in Text.Highlighting.Kate.Types

Methods

fromColor :: Color -> (Double, Double, Double) Source #

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

Defined in Text.Highlighting.Kate.Types

Methods

fromColor :: Color -> (Word8, Word8, Word8) Source #

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

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

toConstr :: Style -> Constr

dataTypeOf :: Style -> DataType

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

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

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

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

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

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

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

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

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

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

Read Style Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

readsPrec :: Int -> ReadS Style

readList :: ReadS [Style]

readPrec :: ReadPrec Style

readListPrec :: ReadPrec [Style]

Show Style Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> Style -> ShowS

show :: Style -> String

showList :: [Style] -> ShowS

data FormatOptions Source #

Options for formatting source code.

Constructors

FormatOptions 

Fields

Instances
Eq FormatOptions Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Read FormatOptions Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

readsPrec :: Int -> ReadS FormatOptions

readList :: ReadS [FormatOptions]

readPrec :: ReadPrec FormatOptions

readListPrec :: ReadPrec [FormatOptions]

Show FormatOptions Source # 
Instance details

Defined in Text.Highlighting.Kate.Types

Methods

showsPrec :: Int -> FormatOptions -> ShowS

show :: FormatOptions -> String

showList :: [FormatOptions] -> ShowS