skylighting-core-0.14.7: syntax highlighting library

Safe Haskell | None
Language | Haskell2010

Skylighting.Types

Contents

- Syntax descriptions
- Tokens
- Styles
- Format options

Description

Basic types for Skylighting.

Synopsis

- type ContextName = (Text, Text)
- data KeywordAttr = KeywordAttr {
  - keywordCaseSensitive :: !Bool
  - keywordDelims :: !(Set Char)
  }
- data WordSet a
  - = CaseSensitiveWords !(Set a)
  - | CaseInsensitiveWords !(Set a)
- makeWordSet :: (FoldCase a, Ord a) => Bool -> [a] -> WordSet a
- inWordSet :: (FoldCase a, Ord a) => a -> WordSet a -> Bool
- data ListItem
  - = Item !Text
  - | IncludeList !(Text, Text)
- data Matcher
  - = DetectChar !Char
  - | Detect2Chars !Char !Char
  - | AnyChar !(Set Char)
  - | RangeDetect !Char !Char
  - | StringDetect !Text
  - | WordDetect !Text
  - | RegExpr !RE
  - | Keyword !KeywordAttr (Either Text (WordSet Text))
  - | Int
  - | Float
  - | HlCOct
  - | HlCHex
  - | HlCStringChar
  - | HlCChar
  - | LineContinue
  - | IncludeRules !ContextName
  - | DetectSpaces
  - | DetectIdentifier
- data Rule = Rule {
  - rMatcher :: !Matcher
  - rAttribute :: !TokenType
  - rIncludeAttribute :: !Bool
  - rWeakDeliminators :: Set Char
  - rDynamic :: !Bool
  - rCaseSensitive :: !Bool
  - rChildren :: ![Rule]
  - rLookahead :: !Bool
  - rFirstNonspace :: !Bool
  - rColumn :: !(Maybe Int)
  - rContextSwitch :: ![ContextSwitch]
  }
- data Context = Context {
  - cName :: !Text
  - cSyntax :: !Text
  - cRules :: ![Rule]
  - cAttribute :: !TokenType
  - cLineEmptyContext :: ![ContextSwitch]
  - cLineEndContext :: ![ContextSwitch]
  - cLineBeginContext :: ![ContextSwitch]
  - cFallthrough :: !Bool
  - cFallthroughContext :: ![ContextSwitch]
  - cDynamic :: !Bool
  }
- data ContextSwitch
  - = Pop
  - | Push !ContextName
- data Syntax = Syntax {
  - sName :: !Text
  - sFilename :: !String
  - sShortname :: !Text
  - sLists :: !(Map Text [ListItem])
  - sContexts :: !(Map Text Context)
  - sAuthor :: !Text
  - sVersion :: !Text
  - sLicense :: !Text
  - sExtensions :: ![String]
  - sStartingContext :: !Text
  }
- type SyntaxMap = Map Text Syntax
- type Token = (TokenType, Text)
- data TokenType
  - = KeywordTok
  - | DataTypeTok
  - | DecValTok
  - | BaseNTok
  - | FloatTok
  - | ConstantTok
  - | CharTok
  - | SpecialCharTok
  - | StringTok
  - | VerbatimStringTok
  - | SpecialStringTok
  - | ImportTok
  - | CommentTok
  - | DocumentationTok
  - | AnnotationTok
  - | CommentVarTok
  - | OtherTok
  - | FunctionTok
  - | VariableTok
  - | ControlFlowTok
  - | OperatorTok
  - | BuiltInTok
  - | ExtensionTok
  - | PreprocessorTok
  - | AttributeTok
  - | RegionMarkerTok
  - | InformationTok
  - | WarningTok
  - | AlertTok
  - | ErrorTok
  - | NormalTok
- type SourceLine = [Token]
- newtype LineNo = LineNo {
  - lineNo :: Int
  }
- data TokenStyle = TokenStyle {
  - tokenColor :: !(Maybe Color)
  - tokenBackground :: !(Maybe Color)
  - tokenBold :: !Bool
  - tokenItalic :: !Bool
  - tokenUnderline :: !Bool
  }
- defStyle :: TokenStyle
- data Color = RGB Word8 Word8 Word8
- class ToColor a where
  - toColor :: a -> Maybe Color
- class FromColor a where
  - fromColor :: Color -> a
- data Style = Style {
  - tokenStyles :: !(Map TokenType TokenStyle)
  - defaultColor :: !(Maybe Color)
  - backgroundColor :: !(Maybe Color)
  - lineNumberColor :: !(Maybe Color)
  - lineNumberBackgroundColor :: !(Maybe Color)
  }
- data ANSIColorLevel
  - = ANSI16Color
  - | ANSI256Color
  - | ANSITrueColor
- data FormatOptions = FormatOptions {
  - numberLines :: !Bool
  - startNumber :: !Int
  - lineAnchors :: !Bool
  - titleAttributes :: !Bool
  - codeClasses :: ![Text]
  - containerClasses :: ![Text]
  - lineIdPrefix :: !Text
  - ansiColorLevel :: !ANSIColorLevel
  }
- defaultFormatOpts :: FormatOptions

# Syntax descriptions

type ContextName = (Text, Text) Source #

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

data KeywordAttr Source #

Attributes controlling how keywords are interpreted.

Constructors

KeywordAttr |

Fields

- keywordCaseSensitive :: !Bool
- keywordDelims :: !(Set Char)

#### Instances

Instances details

Binary KeywordAttr Source # |
Instance details Defined in Skylighting.Types Methods put :: KeywordAttr -> Put Source # get :: Get KeywordAttr Source # putList :: [KeywordAttr] -> Put Source #
Data KeywordAttr Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: KeywordAttr -> Constr Source #

dataTypeOf :: KeywordAttr -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic KeywordAttr Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep KeywordAttr |

Instance details

Defined in Skylighting.Types

type Rep KeywordAttr = D1 ('MetaData "KeywordAttr" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "KeywordAttr" 'PrefixI 'True) (S1 ('MetaSel ('Just "keywordCaseSensitive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keywordDelims") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set Char))))

Methods

from :: KeywordAttr -> Rep KeywordAttr x Source #

to :: Rep KeywordAttr x -> KeywordAttr Source #

Read KeywordAttr Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS KeywordAttr Source # readList :: ReadS [KeywordAttr] Source # readPrec :: ReadPrec KeywordAttr Source # readListPrec :: ReadPrec [KeywordAttr] Source #
Show KeywordAttr Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> KeywordAttr -> ShowS Source # show :: KeywordAttr -> String Source # showList :: [KeywordAttr] -> ShowS Source #
Eq KeywordAttr Source # |
Instance details Defined in Skylighting.Types Methods (==) :: KeywordAttr -> KeywordAttr -> Bool Source # (/=) :: KeywordAttr -> KeywordAttr -> Bool Source #
Ord KeywordAttr Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: KeywordAttr -> KeywordAttr -> Ordering Source #

(<) :: KeywordAttr -> KeywordAttr -> Bool Source #

(<=) :: KeywordAttr -> KeywordAttr -> Bool Source #

(>) :: KeywordAttr -> KeywordAttr -> Bool Source #

(>=) :: KeywordAttr -> KeywordAttr -> Bool Source #

max :: KeywordAttr -> KeywordAttr -> KeywordAttr Source #

min :: KeywordAttr -> KeywordAttr -> KeywordAttr Source #

type Rep KeywordAttr Source # |

Instance details

Defined in Skylighting.Types

type Rep KeywordAttr = D1 ('MetaData "KeywordAttr" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "KeywordAttr" 'PrefixI 'True) (S1 ('MetaSel ('Just "keywordCaseSensitive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keywordDelims") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set Char))))

data WordSet a Source #

A set of "words," possibly case insensitive.

Constructors

CaseSensitiveWords !(Set a) |
CaseInsensitiveWords !(Set a) |

#### Instances

Instances details

Binary a => Binary (WordSet a) Source # |
Instance details Defined in Skylighting.Types Methods put :: WordSet a -> Put Source # get :: Get (WordSet a) Source # putList :: [WordSet a] -> Put Source #
(Data a, Ord a) => Data (WordSet a) Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: WordSet a -> Constr Source #

dataTypeOf :: WordSet a -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic (WordSet a) Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep (WordSet a) |

Instance details

Defined in Skylighting.Types

type Rep (WordSet a) = D1 ('MetaData "WordSet" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "CaseSensitiveWords" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a))) :+: C1 ('MetaCons "CaseInsensitiveWords" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a))))

Methods

from :: WordSet a -> Rep (WordSet a) x Source #

to :: Rep (WordSet a) x -> WordSet a Source #

(Read a, Ord a) => Read (WordSet a) Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS (WordSet a) Source # readList :: ReadS [WordSet a] Source # readPrec :: ReadPrec (WordSet a) Source # readListPrec :: ReadPrec [WordSet a] Source #
Show a => Show (WordSet a) Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> WordSet a -> ShowS Source # show :: WordSet a -> String Source # showList :: [WordSet a] -> ShowS Source #
Eq a => Eq (WordSet a) Source # |
Instance details Defined in Skylighting.Types Methods (==) :: WordSet a -> WordSet a -> Bool Source # (/=) :: WordSet a -> WordSet a -> Bool Source #
Ord a => Ord (WordSet a) Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: WordSet a -> WordSet a -> Ordering Source #

(<) :: WordSet a -> WordSet a -> Bool Source #

(<=) :: WordSet a -> WordSet a -> Bool Source #

(>) :: WordSet a -> WordSet a -> Bool Source #

(>=) :: WordSet a -> WordSet a -> Bool Source #

max :: WordSet a -> WordSet a -> WordSet a Source #

min :: WordSet a -> WordSet a -> WordSet a Source #

type Rep (WordSet a) Source # |

Instance details

Defined in Skylighting.Types

type Rep (WordSet a) = D1 ('MetaData "WordSet" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "CaseSensitiveWords" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a))) :+: C1 ('MetaCons "CaseInsensitiveWords" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a))))

makeWordSet :: (FoldCase a, Ord a) => Bool -> [a] -> WordSet a Source #

A set of words to match (either case-sensitive or case-insensitive).

inWordSet :: (FoldCase a, Ord a) => a -> WordSet a -> Bool Source #

Test for membership in a `WordSet`.

data ListItem Source #

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

Item !Text |
IncludeList !(Text, Text) |

#### Instances

Instances details

Binary ListItem Source # |
Instance details Defined in Skylighting.Types Methods put :: ListItem -> Put Source # get :: Get ListItem Source # putList :: [ListItem] -> Put Source #
Data ListItem Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: ListItem -> Constr Source #

dataTypeOf :: ListItem -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic ListItem Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep ListItem |

Instance details

Defined in Skylighting.Types

type Rep ListItem = D1 ('MetaData "ListItem" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Item" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "IncludeList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Text, Text))))

Methods

from :: ListItem -> Rep ListItem x Source #

to :: Rep ListItem x -> ListItem Source #

Read ListItem Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS ListItem Source # readList :: ReadS [ListItem] Source # readPrec :: ReadPrec ListItem Source # readListPrec :: ReadPrec [ListItem] Source #
Show ListItem Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> ListItem -> ShowS Source # show :: ListItem -> String Source # showList :: [ListItem] -> ShowS Source #
Eq ListItem Source # |
Instance details Defined in Skylighting.Types Methods (==) :: ListItem -> ListItem -> Bool Source # (/=) :: ListItem -> ListItem -> Bool Source #
Ord ListItem Source # |
Instance details Defined in Skylighting.Types Methods compare :: ListItem -> ListItem -> Ordering Source # (<) :: ListItem -> ListItem -> Bool Source # (<=) :: ListItem -> ListItem -> Bool Source # (>) :: ListItem -> ListItem -> Bool Source # (>=) :: ListItem -> ListItem -> Bool Source # max :: ListItem -> ListItem -> ListItem Source # min :: ListItem -> ListItem -> ListItem Source #
type Rep ListItem Source # |

Instance details

Defined in Skylighting.Types

type Rep ListItem = D1 ('MetaData "ListItem" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Item" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "IncludeList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Text, Text))))

data Matcher Source #

Matchers correspond to the element types in a context.

Constructors

DetectChar !Char |
Detect2Chars !Char !Char |
AnyChar !(Set Char) |
RangeDetect !Char !Char |
StringDetect !Text |
WordDetect !Text |
RegExpr !RE |
Keyword !KeywordAttr (Either Text (WordSet Text)) |
Int |
Float |
HlCOct |
HlCHex |
HlCStringChar |
HlCChar |
LineContinue |
IncludeRules !ContextName |
DetectSpaces |
DetectIdentifier |

#### Instances

Instances details

Binary Matcher Source # |
Instance details Defined in Skylighting.Types Methods put :: Matcher -> Put Source # get :: Get Matcher Source # putList :: [Matcher] -> Put Source #
Data Matcher Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: Matcher -> Constr Source #

dataTypeOf :: Matcher -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic Matcher Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Matcher |

Instance details

Defined in Skylighting.Types

type Rep Matcher = D1 ('MetaData "Matcher" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) ((((C1 ('MetaCons "DetectChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "Detect2Chars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (C1 ('MetaCons "AnyChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set Char))) :+: C1 ('MetaCons "RangeDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)))) :+: ((C1 ('MetaCons "StringDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "WordDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "RegExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RE)) :+: (C1 ('MetaCons "Keyword" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KeywordAttr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Either Text (WordSet Text)))) :+: C1 ('MetaCons "Int" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Float" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HlCOct" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HlCHex" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HlCStringChar" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "HlCChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineContinue" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IncludeRules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ContextName)) :+: (C1 ('MetaCons "DetectSpaces" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DetectIdentifier" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: Matcher -> Rep Matcher x Source #

to :: Rep Matcher x -> Matcher Source #

Read Matcher Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Matcher Source # readList :: ReadS [Matcher] Source # readPrec :: ReadPrec Matcher Source # readListPrec :: ReadPrec [Matcher] Source #
Show Matcher Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Matcher -> ShowS Source # show :: Matcher -> String Source # showList :: [Matcher] -> ShowS Source #
Eq Matcher Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Matcher -> Matcher -> Bool Source # (/=) :: Matcher -> Matcher -> Bool Source #
Ord Matcher Source # |
Instance details Defined in Skylighting.Types Methods compare :: Matcher -> Matcher -> Ordering Source # (<) :: Matcher -> Matcher -> Bool Source # (<=) :: Matcher -> Matcher -> Bool Source # (>) :: Matcher -> Matcher -> Bool Source # (>=) :: Matcher -> Matcher -> Bool Source # max :: Matcher -> Matcher -> Matcher Source # min :: Matcher -> Matcher -> Matcher Source #
type Rep Matcher Source # |

Instance details

Defined in Skylighting.Types

type Rep Matcher = D1 ('MetaData "Matcher" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) ((((C1 ('MetaCons "DetectChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "Detect2Chars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (C1 ('MetaCons "AnyChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set Char))) :+: C1 ('MetaCons "RangeDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)))) :+: ((C1 ('MetaCons "StringDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "WordDetect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "RegExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RE)) :+: (C1 ('MetaCons "Keyword" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KeywordAttr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Either Text (WordSet Text)))) :+: C1 ('MetaCons "Int" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Float" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HlCOct" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HlCHex" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HlCStringChar" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "HlCChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineContinue" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IncludeRules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ContextName)) :+: (C1 ('MetaCons "DetectSpaces" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DetectIdentifier" 'PrefixI 'False) (U1 :: Type -> Type))))))

data Rule Source #

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

Constructors

Rule |

Fields

- rMatcher :: !Matcher
- rAttribute :: !TokenType
- rIncludeAttribute :: !Bool
- rWeakDeliminators :: Set Char
- rDynamic :: !Bool
- rCaseSensitive :: !Bool
- rChildren :: ![Rule]
- rLookahead :: !Bool
- rFirstNonspace :: !Bool
- rColumn :: !(Maybe Int)
- rContextSwitch :: ![ContextSwitch]

#### Instances

Instances details

Binary Rule Source # |
Instance details Defined in Skylighting.Types Methods put :: Rule -> Put Source # get :: Get Rule Source # putList :: [Rule] -> Put Source #
Data Rule Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: Rule -> Constr Source #

dataTypeOf :: Rule -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic Rule Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Rule |

Instance details

Defined in Skylighting.Types

type Rep Rule = D1 ('MetaData "Rule" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) (((S1 ('MetaSel ('Just "rMatcher") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Matcher) :*: S1 ('MetaSel ('Just "rAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenType)) :*: (S1 ('MetaSel ('Just "rIncludeAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rWeakDeliminators") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char)) :*: S1 ('MetaSel ('Just "rDynamic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "rCaseSensitive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rChildren") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Rule]) :*: S1 ('MetaSel ('Just "rLookahead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :*: (S1 ('MetaSel ('Just "rFirstNonspace") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "rContextSwitch") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]))))))

Methods

from :: Rule -> Rep Rule x Source #

to :: Rep Rule x -> Rule Source #

Read Rule Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Rule Source # readList :: ReadS [Rule] Source # readPrec :: ReadPrec Rule Source # readListPrec :: ReadPrec [Rule] Source #
Show Rule Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Rule -> ShowS Source # show :: Rule -> String Source # showList :: [Rule] -> ShowS Source #
Eq Rule Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Rule -> Rule -> Bool Source # (/=) :: Rule -> Rule -> Bool Source #
Ord Rule Source # |
Instance details Defined in Skylighting.Types Methods compare :: Rule -> Rule -> Ordering Source # (<) :: Rule -> Rule -> Bool Source # (<=) :: Rule -> Rule -> Bool Source # (>) :: Rule -> Rule -> Bool Source # (>=) :: Rule -> Rule -> Bool Source # max :: Rule -> Rule -> Rule Source # min :: Rule -> Rule -> Rule Source #
type Rep Rule Source # |

Instance details

Defined in Skylighting.Types

type Rep Rule = D1 ('MetaData "Rule" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) (((S1 ('MetaSel ('Just "rMatcher") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Matcher) :*: S1 ('MetaSel ('Just "rAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenType)) :*: (S1 ('MetaSel ('Just "rIncludeAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rWeakDeliminators") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set Char)) :*: S1 ('MetaSel ('Just "rDynamic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "rCaseSensitive") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rChildren") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Rule]) :*: S1 ('MetaSel ('Just "rLookahead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :*: (S1 ('MetaSel ('Just "rFirstNonspace") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "rContextSwitch") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]))))))

data Context Source #

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

Constructors

Context |

Fields

- cName :: !Text
- cSyntax :: !Text
- cRules :: ![Rule]
- cAttribute :: !TokenType
- cLineEmptyContext :: ![ContextSwitch]
- cLineEndContext :: ![ContextSwitch]
- cLineBeginContext :: ![ContextSwitch]
- cFallthrough :: !Bool
- cFallthroughContext :: ![ContextSwitch]
- cDynamic :: !Bool

#### Instances

Instances details

Binary Context Source # |
Instance details Defined in Skylighting.Types Methods put :: Context -> Put Source # get :: Get Context Source # putList :: [Context] -> Put Source #
Data Context Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: Context -> Constr Source #

dataTypeOf :: Context -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic Context Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Context |

Instance details

Defined in Skylighting.Types

type Rep Context = D1 ('MetaData "Context" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Context" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "cSyntax") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "cRules") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Rule]) :*: (S1 ('MetaSel ('Just "cAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenType) :*: S1 ('MetaSel ('Just "cLineEmptyContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch])))) :*: ((S1 ('MetaSel ('Just "cLineEndContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]) :*: S1 ('MetaSel ('Just "cLineBeginContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch])) :*: (S1 ('MetaSel ('Just "cFallthrough") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "cFallthroughContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]) :*: S1 ('MetaSel ('Just "cDynamic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))))

Methods

from :: Context -> Rep Context x Source #

to :: Rep Context x -> Context Source #

Read Context Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Context Source # readList :: ReadS [Context] Source # readPrec :: ReadPrec Context Source # readListPrec :: ReadPrec [Context] Source #
Show Context Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Context -> ShowS Source # show :: Context -> String Source # showList :: [Context] -> ShowS Source #
Eq Context Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Context -> Context -> Bool Source # (/=) :: Context -> Context -> Bool Source #
Ord Context Source # |
Instance details Defined in Skylighting.Types Methods compare :: Context -> Context -> Ordering Source # (<) :: Context -> Context -> Bool Source # (<=) :: Context -> Context -> Bool Source # (>) :: Context -> Context -> Bool Source # (>=) :: Context -> Context -> Bool Source # max :: Context -> Context -> Context Source # min :: Context -> Context -> Context Source #
type Rep Context Source # |

Instance details

Defined in Skylighting.Types

type Rep Context = D1 ('MetaData "Context" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Context" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "cSyntax") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "cRules") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Rule]) :*: (S1 ('MetaSel ('Just "cAttribute") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenType) :*: S1 ('MetaSel ('Just "cLineEmptyContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch])))) :*: ((S1 ('MetaSel ('Just "cLineEndContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]) :*: S1 ('MetaSel ('Just "cLineBeginContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch])) :*: (S1 ('MetaSel ('Just "cFallthrough") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "cFallthroughContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ContextSwitch]) :*: S1 ('MetaSel ('Just "cDynamic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))))

data ContextSwitch Source #

A context switch, either pops or pushes a context.

Constructors

Pop |
Push !ContextName |

#### Instances

Instances details

Binary ContextSwitch Source # |
Instance details Defined in Skylighting.Types Methods put :: ContextSwitch -> Put Source # get :: Get ContextSwitch Source # putList :: [ContextSwitch] -> Put Source #
Data ContextSwitch Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: ContextSwitch -> Constr Source #

dataTypeOf :: ContextSwitch -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic ContextSwitch Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep ContextSwitch |
Instance details Defined in Skylighting.Types type Rep ContextSwitch = D1 ('MetaData "ContextSwitch" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Pop" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Push" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ContextName)))

Methods

from :: ContextSwitch -> Rep ContextSwitch x Source #

to :: Rep ContextSwitch x -> ContextSwitch Source #

Read ContextSwitch Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS ContextSwitch Source # readList :: ReadS [ContextSwitch] Source # readPrec :: ReadPrec ContextSwitch Source # readListPrec :: ReadPrec [ContextSwitch] Source #
Show ContextSwitch Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> ContextSwitch -> ShowS Source # show :: ContextSwitch -> String Source # showList :: [ContextSwitch] -> ShowS Source #
Eq ContextSwitch Source # |
Instance details Defined in Skylighting.Types Methods (==) :: ContextSwitch -> ContextSwitch -> Bool Source # (/=) :: ContextSwitch -> ContextSwitch -> Bool Source #
Ord ContextSwitch Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: ContextSwitch -> ContextSwitch -> Ordering Source #

(<) :: ContextSwitch -> ContextSwitch -> Bool Source #

(<=) :: ContextSwitch -> ContextSwitch -> Bool Source #

(>) :: ContextSwitch -> ContextSwitch -> Bool Source #

(>=) :: ContextSwitch -> ContextSwitch -> Bool Source #

max :: ContextSwitch -> ContextSwitch -> ContextSwitch Source #

min :: ContextSwitch -> ContextSwitch -> ContextSwitch Source #

type Rep ContextSwitch Source # |
Instance details Defined in Skylighting.Types type Rep ContextSwitch = D1 ('MetaData "ContextSwitch" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Pop" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Push" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ContextName)))

data Syntax Source #

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

Constructors

Syntax |

Fields

- sName :: !Text
- sFilename :: !String
- sShortname :: !Text
- sLists :: !(Map Text [ListItem])
- sContexts :: !(Map Text Context)
- sAuthor :: !Text
- sVersion :: !Text
- sLicense :: !Text
- sExtensions :: ![String]
- sStartingContext :: !Text

#### Instances

Instances details

Binary Syntax Source # |
Instance details Defined in Skylighting.Types Methods put :: Syntax -> Put Source # get :: Get Syntax Source # putList :: [Syntax] -> Put Source #
Data Syntax Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: Syntax -> Constr Source #

dataTypeOf :: Syntax -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic Syntax Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Syntax |

Instance details

Defined in Skylighting.Types

type Rep Syntax = D1 ('MetaData "Syntax" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Syntax" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sFilename") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :*: (S1 ('MetaSel ('Just "sShortname") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sLists") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Text [ListItem])) :*: S1 ('MetaSel ('Just "sContexts") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Text Context))))) :*: ((S1 ('MetaSel ('Just "sAuthor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "sLicense") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sExtensions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]) :*: S1 ('MetaSel ('Just "sStartingContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))))

Methods

from :: Syntax -> Rep Syntax x Source #

to :: Rep Syntax x -> Syntax Source #

Read Syntax Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Syntax Source # readList :: ReadS [Syntax] Source # readPrec :: ReadPrec Syntax Source # readListPrec :: ReadPrec [Syntax] Source #
Show Syntax Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Syntax -> ShowS Source # show :: Syntax -> String Source # showList :: [Syntax] -> ShowS Source #
Eq Syntax Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Syntax -> Syntax -> Bool Source # (/=) :: Syntax -> Syntax -> Bool Source #
Ord Syntax Source # |
Instance details Defined in Skylighting.Types Methods compare :: Syntax -> Syntax -> Ordering Source # (<) :: Syntax -> Syntax -> Bool Source # (<=) :: Syntax -> Syntax -> Bool Source # (>) :: Syntax -> Syntax -> Bool Source # (>=) :: Syntax -> Syntax -> Bool Source # max :: Syntax -> Syntax -> Syntax Source # min :: Syntax -> Syntax -> Syntax Source #
type Rep Syntax Source # |

Instance details

Defined in Skylighting.Types

type Rep Syntax = D1 ('MetaData "Syntax" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Syntax" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sFilename") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :*: (S1 ('MetaSel ('Just "sShortname") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sLists") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Text [ListItem])) :*: S1 ('MetaSel ('Just "sContexts") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Text Context))))) :*: ((S1 ('MetaSel ('Just "sAuthor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "sLicense") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sExtensions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]) :*: S1 ('MetaSel ('Just "sStartingContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))))

type SyntaxMap = Map Text Syntax Source #

A map of syntaxes, keyed by full name.

# Tokens

type Token = (TokenType, Text) Source #

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

data TokenType Source #

`KeywordTok` corresponds to `dsKeyword` in Kate syntax descriptions, and so on.

Constructors

KeywordTok |
DataTypeTok |
DecValTok |
BaseNTok |
FloatTok |
ConstantTok |
CharTok |
SpecialCharTok |
StringTok |
VerbatimStringTok |
SpecialStringTok |
ImportTok |
CommentTok |
DocumentationTok |
AnnotationTok |
CommentVarTok |
OtherTok |
FunctionTok |
VariableTok |
ControlFlowTok |
OperatorTok |
BuiltInTok |
ExtensionTok |
PreprocessorTok |
AttributeTok |
RegionMarkerTok |
InformationTok |
WarningTok |
AlertTok |
ErrorTok |
NormalTok |

#### Instances

Instances details

FromJSON TokenType Source # |
Instance details Defined in Skylighting.Types Methods parseJSON :: Value -> Parser TokenType Source # parseJSONList :: Value -> Parser [TokenType] Source # omittedField :: Maybe TokenType Source #
FromJSONKey TokenType Source # | JSON `Keyword` corresponds to `KeywordTok`, and so on.
Instance details Defined in Skylighting.Types Methods fromJSONKey :: FromJSONKeyFunction TokenType Source # fromJSONKeyList :: FromJSONKeyFunction [TokenType] Source #
ToJSON TokenType Source # |
Instance details Defined in Skylighting.Types Methods toJSON :: TokenType -> Value Source # toEncoding :: TokenType -> Encoding Source # toJSONList :: [TokenType] -> Value Source # toEncodingList :: [TokenType] -> Encoding Source # omitField :: TokenType -> Bool Source #
ToJSONKey TokenType Source # |
Instance details Defined in Skylighting.Types Methods toJSONKey :: ToJSONKeyFunction TokenType Source # toJSONKeyList :: ToJSONKeyFunction [TokenType] Source #
Binary TokenType Source # |
Instance details Defined in Skylighting.Types Methods put :: TokenType -> Put Source # get :: Get TokenType Source # putList :: [TokenType] -> Put Source #
Data TokenType Source # |

Instance details

Defined in Skylighting.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 :: forall r r'. (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 #

Bounded TokenType Source # |
Instance details Defined in Skylighting.Types Methods minBound :: TokenType Source # maxBound :: TokenType Source #
Enum TokenType Source # |

Instance details

Defined in Skylighting.Types

Methods

succ :: TokenType -> TokenType Source #

pred :: TokenType -> TokenType Source #

toEnum :: Int -> TokenType Source #

fromEnum :: TokenType -> Int Source #

enumFrom :: TokenType -> [TokenType] Source #

enumFromThen :: TokenType -> TokenType -> [TokenType] Source #

enumFromTo :: TokenType -> TokenType -> [TokenType] Source #

enumFromThenTo :: TokenType -> TokenType -> TokenType -> [TokenType] Source #

Generic TokenType Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep TokenType |

Instance details

Defined in Skylighting.Types

type Rep TokenType = D1 ('MetaData "TokenType" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) ((((C1 ('MetaCons "KeywordTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DataTypeTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecValTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BaseNTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FloatTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ConstantTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CharTok" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "SpecialCharTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StringTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "VerbatimStringTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpecialStringTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ImportTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CommentTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DocumentationTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AnnotationTok" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "CommentVarTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FunctionTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VariableTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ControlFlowTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OperatorTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltInTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtensionTok" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PreprocessorTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AttributeTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RegionMarkerTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InformationTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "WarningTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlertTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NormalTok" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: TokenType -> Rep TokenType x Source #

to :: Rep TokenType x -> TokenType Source #

Read TokenType Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS TokenType Source # readList :: ReadS [TokenType] Source # readPrec :: ReadPrec TokenType Source # readListPrec :: ReadPrec [TokenType] Source #
Show TokenType Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> TokenType -> ShowS Source # show :: TokenType -> String Source # showList :: [TokenType] -> ShowS Source #
Eq TokenType Source # |
Instance details Defined in Skylighting.Types Methods (==) :: TokenType -> TokenType -> Bool Source # (/=) :: TokenType -> TokenType -> Bool Source #
Ord TokenType Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: TokenType -> TokenType -> Ordering Source #

(<) :: TokenType -> TokenType -> Bool Source #

(<=) :: TokenType -> TokenType -> Bool Source #

(>) :: TokenType -> TokenType -> Bool Source #

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

max :: TokenType -> TokenType -> TokenType Source #

min :: TokenType -> TokenType -> TokenType Source #

type Rep TokenType Source # |

Instance details

Defined in Skylighting.Types

type Rep TokenType = D1 ('MetaData "TokenType" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) ((((C1 ('MetaCons "KeywordTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DataTypeTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecValTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BaseNTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FloatTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ConstantTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CharTok" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "SpecialCharTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StringTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "VerbatimStringTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpecialStringTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ImportTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CommentTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DocumentationTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AnnotationTok" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "CommentVarTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FunctionTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VariableTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ControlFlowTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OperatorTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltInTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtensionTok" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PreprocessorTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AttributeTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RegionMarkerTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InformationTok" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "WarningTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlertTok" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ErrorTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NormalTok" 'PrefixI 'False) (U1 :: Type -> Type))))))

type SourceLine = [Token] Source #

A line of source: a list of labeled tokens.

newtype LineNo Source #

Line numbers

Constructors

LineNo |

Fields

- lineNo :: Int

#### Instances

Instances details

Enum LineNo Source # |

Instance details

Defined in Skylighting.Types

Methods

succ :: LineNo -> LineNo Source #

pred :: LineNo -> LineNo Source #

toEnum :: Int -> LineNo Source #

fromEnum :: LineNo -> Int Source #

enumFrom :: LineNo -> [LineNo] Source #

enumFromThen :: LineNo -> LineNo -> [LineNo] Source #

enumFromTo :: LineNo -> LineNo -> [LineNo] Source #

enumFromThenTo :: LineNo -> LineNo -> LineNo -> [LineNo] Source #

Show LineNo Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> LineNo -> ShowS Source # show :: LineNo -> String Source # showList :: [LineNo] -> ShowS Source #

# Styles

data TokenStyle Source #

A `TokenStyle` determines how a token is to be rendered.

Constructors

TokenStyle |

Fields

- tokenColor :: !(Maybe Color)
- tokenBackground :: !(Maybe Color)
- tokenBold :: !Bool
- tokenItalic :: !Bool
- tokenUnderline :: !Bool

#### Instances

Instances details

FromJSON TokenStyle Source # | The keywords used in KDE syntax themes are used, e.g. `text-color` for default token color.
Instance details Defined in Skylighting.Types Methods parseJSON :: Value -> Parser TokenStyle Source # parseJSONList :: Value -> Parser [TokenStyle] Source # omittedField :: Maybe TokenStyle Source #
ToJSON TokenStyle Source # |
Instance details Defined in Skylighting.Types Methods toJSON :: TokenStyle -> Value Source # toEncoding :: TokenStyle -> Encoding Source # toJSONList :: [TokenStyle] -> Value Source # toEncodingList :: [TokenStyle] -> Encoding Source # omitField :: TokenStyle -> Bool Source #
Binary TokenStyle Source # |
Instance details Defined in Skylighting.Types Methods put :: TokenStyle -> Put Source # get :: Get TokenStyle Source # putList :: [TokenStyle] -> Put Source #
Data TokenStyle Source # |

Instance details

Defined in Skylighting.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 :: forall r r'. (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 #

Generic TokenStyle Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep TokenStyle |

Instance details

Defined in Skylighting.Types

type Rep TokenStyle = D1 ('MetaData "TokenStyle" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "TokenStyle" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just "tokenBackground") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just "tokenBold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "tokenItalic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "tokenUnderline") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))))

Methods

from :: TokenStyle -> Rep TokenStyle x Source #

to :: Rep TokenStyle x -> TokenStyle Source #

Read TokenStyle Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS TokenStyle Source # readList :: ReadS [TokenStyle] Source # readPrec :: ReadPrec TokenStyle Source # readListPrec :: ReadPrec [TokenStyle] Source #
Show TokenStyle Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> TokenStyle -> ShowS Source # show :: TokenStyle -> String Source # showList :: [TokenStyle] -> ShowS Source #
Eq TokenStyle Source # |
Instance details Defined in Skylighting.Types Methods (==) :: TokenStyle -> TokenStyle -> Bool Source # (/=) :: TokenStyle -> TokenStyle -> Bool Source #
Ord TokenStyle Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: TokenStyle -> TokenStyle -> Ordering Source #

(<) :: TokenStyle -> TokenStyle -> Bool Source #

(<=) :: TokenStyle -> TokenStyle -> Bool Source #

(>) :: TokenStyle -> TokenStyle -> Bool Source #

(>=) :: TokenStyle -> TokenStyle -> Bool Source #

max :: TokenStyle -> TokenStyle -> TokenStyle Source #

min :: TokenStyle -> TokenStyle -> TokenStyle Source #

type Rep TokenStyle Source # |

Instance details

Defined in Skylighting.Types

type Rep TokenStyle = D1 ('MetaData "TokenStyle" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "TokenStyle" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just "tokenBackground") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just "tokenBold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "tokenItalic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "tokenUnderline") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))))

defStyle :: TokenStyle Source #

Default style.

data Color Source #

A color (red, green, blue).

Constructors

RGB Word8 Word8 Word8 |

#### Instances

Instances details

FromJSON Color Source # | JSON `"#1aff2b"` corresponds to the color `RGB 0x1a 0xff 0x2b`.
Instance details Defined in Skylighting.Types Methods parseJSON :: Value -> Parser Color Source # parseJSONList :: Value -> Parser [Color] Source # omittedField :: Maybe Color Source #
ToJSON Color Source # |
Instance details Defined in Skylighting.Types Methods toJSON :: Color -> Value Source # toEncoding :: Color -> Encoding Source # toJSONList :: [Color] -> Value Source # toEncodingList :: [Color] -> Encoding Source # omitField :: Color -> Bool Source #
Binary Color Source # |
Instance details Defined in Skylighting.Types Methods put :: Color -> Put Source # get :: Get Color Source # putList :: [Color] -> Put Source #
Data Color Source # |

Instance details

Defined in Skylighting.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 :: forall r r'. (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 #

Generic Color Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Color |

Instance details

Defined in Skylighting.Types

type Rep Color = D1 ('MetaData "Color" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "RGB" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8))))

Methods

from :: Color -> Rep Color x Source #

to :: Rep Color x -> Color Source #

Read Color Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Color Source # readList :: ReadS [Color] Source # readPrec :: ReadPrec Color Source # readListPrec :: ReadPrec [Color] Source #
Show Color Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Color -> ShowS Source # show :: Color -> String Source # showList :: [Color] -> ShowS Source #
Eq Color Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Color -> Color -> Bool Source # (/=) :: Color -> Color -> Bool Source #
Ord Color Source # |
Instance details Defined in Skylighting.Types Methods compare :: Color -> Color -> Ordering Source # (<) :: Color -> Color -> Bool Source # (<=) :: Color -> Color -> Bool Source # (>) :: Color -> Color -> Bool Source # (>=) :: Color -> Color -> Bool Source # max :: Color -> Color -> Color Source # min :: Color -> Color -> Color Source #
type Rep Color Source # |

Instance details

Defined in Skylighting.Types

type Rep Color = D1 ('MetaData "Color" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "RGB" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word8))))

class ToColor a where Source #

Things that can be converted to a color.

Methods

toColor :: a -> Maybe Color Source #

#### Instances

Instances details

ToColor String Source # |
Instance details Defined in Skylighting.Types Methods toColor :: String -> Maybe Color Source #
ToColor Int Source # |
Instance details Defined in Skylighting.Types Methods toColor :: Int -> Maybe Color Source #
(RealFrac a, Floating a) => ToColor (Colour a) Source # |
Instance details Defined in Skylighting.Types Methods toColor :: Colour a -> Maybe Color Source #
ToColor (Word8, Word8, Word8) Source # |
Instance details Defined in Skylighting.Types Methods toColor :: (Word8, Word8, Word8) -> Maybe Color Source #
ToColor (Double, Double, Double) Source # |
Instance details Defined in Skylighting.Types Methods toColor :: (Double, Double, Double) -> Maybe Color Source #

class FromColor a where Source #

Different representations of a `Color`.

Methods

fromColor :: Color -> a Source #

#### Instances

Instances details

FromColor String Source # |
Instance details Defined in Skylighting.Types Methods fromColor :: Color -> String Source #
(Ord a, Floating a) => FromColor (Colour a) Source # |
Instance details Defined in Skylighting.Types Methods fromColor :: Color -> Colour a Source #
FromColor (Word8, Word8, Word8) Source # |
Instance details Defined in Skylighting.Types Methods fromColor :: Color -> (Word8, Word8, Word8) Source #
FromColor (Double, Double, Double) Source # |
Instance details Defined in Skylighting.Types Methods fromColor :: Color -> (Double, Double, Double) Source #

data Style Source #

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.

Constructors

Style |

Fields

- tokenStyles :: !(Map TokenType TokenStyle)
- defaultColor :: !(Maybe Color)
- backgroundColor :: !(Maybe Color)
- lineNumberColor :: !(Maybe Color)
- lineNumberBackgroundColor :: !(Maybe Color)

#### Instances

Instances details

FromJSON Style Source # | The FromJSON instance for `Style` is designed so that a KDE syntax theme (JSON) can be decoded directly as a `Style`.
Instance details Defined in Skylighting.Types Methods parseJSON :: Value -> Parser Style Source # parseJSONList :: Value -> Parser [Style] Source # omittedField :: Maybe Style Source #
ToJSON Style Source # |
Instance details Defined in Skylighting.Types Methods toJSON :: Style -> Value Source # toEncoding :: Style -> Encoding Source # toJSONList :: [Style] -> Value Source # toEncodingList :: [Style] -> Encoding Source # omitField :: Style -> Bool Source #
Binary Style Source # |
Instance details Defined in Skylighting.Types Methods put :: Style -> Put Source # get :: Get Style Source # putList :: [Style] -> Put Source #
Data Style Source # |

Instance details

Defined in Skylighting.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 :: forall r r'. (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 #

Generic Style Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep Style |

Instance details

Defined in Skylighting.Types

type Rep Style = D1 ('MetaData "Style" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenStyles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map TokenType TokenStyle)) :*: S1 ('MetaSel ('Just "defaultColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just "backgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: (S1 ('MetaSel ('Just "lineNumberColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just "lineNumberBackgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))))))

Methods

from :: Style -> Rep Style x Source #

to :: Rep Style x -> Style Source #

Read Style Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS Style Source # readList :: ReadS [Style] Source # readPrec :: ReadPrec Style Source # readListPrec :: ReadPrec [Style] Source #
Show Style Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> Style -> ShowS Source # show :: Style -> String Source # showList :: [Style] -> ShowS Source #
Eq Style Source # |
Instance details Defined in Skylighting.Types Methods (==) :: Style -> Style -> Bool Source # (/=) :: Style -> Style -> Bool Source #
Ord Style Source # |
Instance details Defined in Skylighting.Types Methods compare :: Style -> Style -> Ordering Source # (<) :: Style -> Style -> Bool Source # (<=) :: Style -> Style -> Bool Source # (>) :: Style -> Style -> Bool Source # (>=) :: Style -> Style -> Bool Source # max :: Style -> Style -> Style Source # min :: Style -> Style -> Style Source #
type Rep Style Source # |

Instance details

Defined in Skylighting.Types

type Rep Style = D1 ('MetaData "Style" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenStyles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map TokenType TokenStyle)) :*: S1 ('MetaSel ('Just "defaultColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just "backgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: (S1 ('MetaSel ('Just "lineNumberColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just "lineNumberBackgroundColor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))))))

data ANSIColorLevel Source #

The available levels of color complexity in ANSI terminal output.

Constructors

ANSI16Color | 16-color mode
ANSI256Color | 256-color mode
ANSITrueColor | True-color mode

#### Instances

Instances details

Binary ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types Methods put :: ANSIColorLevel -> Put Source # get :: Get ANSIColorLevel Source # putList :: [ANSIColorLevel] -> Put Source #
Data ANSIColorLevel Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: ANSIColorLevel -> Constr Source #

dataTypeOf :: ANSIColorLevel -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Bounded ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types Methods minBound :: ANSIColorLevel Source # maxBound :: ANSIColorLevel Source #
Enum ANSIColorLevel Source # |

Instance details

Defined in Skylighting.Types

Methods

succ :: ANSIColorLevel -> ANSIColorLevel Source #

pred :: ANSIColorLevel -> ANSIColorLevel Source #

toEnum :: Int -> ANSIColorLevel Source #

fromEnum :: ANSIColorLevel -> Int Source #

enumFrom :: ANSIColorLevel -> [ANSIColorLevel] Source #

enumFromThen :: ANSIColorLevel -> ANSIColorLevel -> [ANSIColorLevel] Source #

enumFromTo :: ANSIColorLevel -> ANSIColorLevel -> [ANSIColorLevel] Source #

enumFromThenTo :: ANSIColorLevel -> ANSIColorLevel -> ANSIColorLevel -> [ANSIColorLevel] Source #

Generic ANSIColorLevel Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep ANSIColorLevel |
Instance details Defined in Skylighting.Types type Rep ANSIColorLevel = D1 ('MetaData "ANSIColorLevel" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "ANSI16Color" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ANSI256Color" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ANSITrueColor" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: ANSIColorLevel -> Rep ANSIColorLevel x Source #

to :: Rep ANSIColorLevel x -> ANSIColorLevel Source #

Read ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS ANSIColorLevel Source # readList :: ReadS [ANSIColorLevel] Source # readPrec :: ReadPrec ANSIColorLevel Source # readListPrec :: ReadPrec [ANSIColorLevel] Source #
Show ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> ANSIColorLevel -> ShowS Source # show :: ANSIColorLevel -> String Source # showList :: [ANSIColorLevel] -> ShowS Source #
Eq ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types Methods (==) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source # (/=) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source #
Ord ANSIColorLevel Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: ANSIColorLevel -> ANSIColorLevel -> Ordering Source #

(<) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source #

(<=) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source #

(>) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source #

(>=) :: ANSIColorLevel -> ANSIColorLevel -> Bool Source #

max :: ANSIColorLevel -> ANSIColorLevel -> ANSIColorLevel Source #

min :: ANSIColorLevel -> ANSIColorLevel -> ANSIColorLevel Source #

type Rep ANSIColorLevel Source # |
Instance details Defined in Skylighting.Types type Rep ANSIColorLevel = D1 ('MetaData "ANSIColorLevel" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "ANSI16Color" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ANSI256Color" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ANSITrueColor" 'PrefixI 'False) (U1 :: Type -> Type)))

# Format options

data FormatOptions Source #

Options for formatting source code.

Constructors

FormatOptions |

Fields

- numberLines :: !Bool

  Number lines

- startNumber :: !Int

  Number of first line

- lineAnchors :: !Bool

  Anchors on each line number

- titleAttributes :: !Bool

  Html titles with token types

- codeClasses :: ![Text]

  Additional classes for Html code tag

- containerClasses :: ![Text]

  Additional classes for Html container tag

- lineIdPrefix :: !Text

  Prefix for id attributes on lines

- ansiColorLevel :: !ANSIColorLevel

  Level of ANSI color support to use

#### Instances

Instances details

Binary FormatOptions Source # |
Instance details Defined in Skylighting.Types Methods put :: FormatOptions -> Put Source # get :: Get FormatOptions Source # putList :: [FormatOptions] -> Put Source #
Data FormatOptions Source # |

Instance details

Defined in Skylighting.Types

Methods

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

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

toConstr :: FormatOptions -> Constr Source #

dataTypeOf :: FormatOptions -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic FormatOptions Source # |

Instance details

Defined in Skylighting.Types

Associated Types

type Rep FormatOptions |

Instance details

Defined in Skylighting.Types

type Rep FormatOptions = D1 ('MetaData "FormatOptions" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "FormatOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "numberLines") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "startNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "lineAnchors") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "titleAttributes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "codeClasses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "containerClasses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])) :*: (S1 ('MetaSel ('Just "lineIdPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ansiColorLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ANSIColorLevel)))))

Methods

from :: FormatOptions -> Rep FormatOptions x Source #

to :: Rep FormatOptions x -> FormatOptions Source #

Read FormatOptions Source # |
Instance details Defined in Skylighting.Types Methods readsPrec :: Int -> ReadS FormatOptions Source # readList :: ReadS [FormatOptions] Source # readPrec :: ReadPrec FormatOptions Source # readListPrec :: ReadPrec [FormatOptions] Source #
Show FormatOptions Source # |
Instance details Defined in Skylighting.Types Methods showsPrec :: Int -> FormatOptions -> ShowS Source # show :: FormatOptions -> String Source # showList :: [FormatOptions] -> ShowS Source #
Eq FormatOptions Source # |
Instance details Defined in Skylighting.Types Methods (==) :: FormatOptions -> FormatOptions -> Bool Source # (/=) :: FormatOptions -> FormatOptions -> Bool Source #
Ord FormatOptions Source # |

Instance details

Defined in Skylighting.Types

Methods

compare :: FormatOptions -> FormatOptions -> Ordering Source #

(<) :: FormatOptions -> FormatOptions -> Bool Source #

(<=) :: FormatOptions -> FormatOptions -> Bool Source #

(>) :: FormatOptions -> FormatOptions -> Bool Source #

(>=) :: FormatOptions -> FormatOptions -> Bool Source #

max :: FormatOptions -> FormatOptions -> FormatOptions Source #

min :: FormatOptions -> FormatOptions -> FormatOptions Source #

type Rep FormatOptions Source # |

Instance details

Defined in Skylighting.Types

type Rep FormatOptions = D1 ('MetaData "FormatOptions" "Skylighting.Types" "skylighting-core-0.14.7-HfvlfXa5gCbCNuYts30zLx" 'False) (C1 ('MetaCons "FormatOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "numberLines") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "startNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "lineAnchors") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "titleAttributes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "codeClasses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "containerClasses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])) :*: (S1 ('MetaSel ('Just "lineIdPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ansiColorLevel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ANSIColorLevel)))))

defaultFormatOpts :: FormatOptions Source #

Default formatting options.