skylighting-core
Safe HaskellNone
LanguageHaskell2010

Skylighting.Types

Description

Basic types for Skylighting.

Synopsis

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

Instances

Instances details
Binary KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: KeywordAttr -> Put

get :: Get KeywordAttr

putList :: [KeywordAttr] -> Put

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

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

toConstr :: KeywordAttr -> Constr

dataTypeOf :: KeywordAttr -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep KeywordAttr x -> KeywordAttr

Read KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS KeywordAttr

readList :: ReadS [KeywordAttr]

readPrec :: ReadPrec KeywordAttr

readListPrec :: ReadPrec [KeywordAttr]

Show KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> KeywordAttr -> ShowS

show :: KeywordAttr -> String

showList :: [KeywordAttr] -> ShowS

Eq KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

Methods

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

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

Ord KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

type Rep KeywordAttr Source # 
Instance details

Defined in Skylighting.Types

type Rep KeywordAttr = D1 ('MetaData "KeywordAttr" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

get :: Get (WordSet a)

putList :: [WordSet a] -> Put

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

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

toConstr :: WordSet a -> Constr

dataTypeOf :: WordSet a -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

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

(Read a, Ord a) => Read (WordSet a) Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS (WordSet a)

readList :: ReadS [WordSet a]

readPrec :: ReadPrec (WordSet a)

readListPrec :: ReadPrec [WordSet a]

Show a => Show (WordSet a) Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> WordSet a -> ShowS

show :: WordSet a -> String

showList :: [WordSet a] -> ShowS

Eq a => Eq (WordSet a) Source # 
Instance details

Defined in Skylighting.Types

Methods

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

(/=) :: WordSet a -> WordSet a -> Bool

Ord a => Ord (WordSet a) Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: WordSet a -> WordSet a -> Ordering

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

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

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

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

max :: WordSet a -> WordSet a -> WordSet a

min :: WordSet a -> WordSet a -> WordSet a

type Rep (WordSet a) Source # 
Instance details

Defined in Skylighting.Types

type Rep (WordSet a) = D1 ('MetaData "WordSet" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

get :: Get ListItem

putList :: [ListItem] -> Put

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

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

toConstr :: ListItem -> Constr

dataTypeOf :: ListItem -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep ListItem x -> ListItem

Read ListItem Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS ListItem

readList :: ReadS [ListItem]

readPrec :: ReadPrec ListItem

readListPrec :: ReadPrec [ListItem]

Show ListItem Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> ListItem -> ShowS

show :: ListItem -> String

showList :: [ListItem] -> ShowS

Eq ListItem Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: ListItem -> ListItem -> Bool

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

Ord ListItem Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: ListItem -> ListItem -> Ordering

(<) :: ListItem -> ListItem -> Bool

(<=) :: ListItem -> ListItem -> Bool

(>) :: ListItem -> ListItem -> Bool

(>=) :: ListItem -> ListItem -> Bool

max :: ListItem -> ListItem -> ListItem

min :: ListItem -> ListItem -> ListItem

type Rep ListItem Source # 
Instance details

Defined in Skylighting.Types

type Rep ListItem = D1 ('MetaData "ListItem" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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 !Char 
IncludeRules !ContextName 
DetectSpaces 
DetectIdentifier 

Instances

Instances details
Binary Matcher Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Matcher -> Put

get :: Get Matcher

putList :: [Matcher] -> Put

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

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

toConstr :: Matcher -> Constr

dataTypeOf :: Matcher -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (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

to :: Rep Matcher x -> Matcher

Read Matcher Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Matcher

readList :: ReadS [Matcher]

readPrec :: ReadPrec Matcher

readListPrec :: ReadPrec [Matcher]

Show Matcher Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Matcher -> ShowS

show :: Matcher -> String

showList :: [Matcher] -> ShowS

Eq Matcher Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Matcher -> Matcher -> Bool

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

Ord Matcher Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Matcher -> Matcher -> Ordering

(<) :: Matcher -> Matcher -> Bool

(<=) :: Matcher -> Matcher -> Bool

(>) :: Matcher -> Matcher -> Bool

(>=) :: Matcher -> Matcher -> Bool

max :: Matcher -> Matcher -> Matcher

min :: Matcher -> Matcher -> Matcher

type Rep Matcher Source # 
Instance details

Defined in Skylighting.Types

type Rep Matcher = D1 ('MetaData "Matcher" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (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

Instances

Instances details
Binary Rule Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Rule -> Put

get :: Get Rule

putList :: [Rule] -> Put

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

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

toConstr :: Rule -> Constr

dataTypeOf :: Rule -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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 "rWordDelimiters") '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

to :: Rep Rule x -> Rule

Read Rule Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Rule

readList :: ReadS [Rule]

readPrec :: ReadPrec Rule

readListPrec :: ReadPrec [Rule]

Show Rule Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Rule -> ShowS

show :: Rule -> String

showList :: [Rule] -> ShowS

Eq Rule Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Rule -> Rule -> Bool

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

Ord Rule Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Rule -> Rule -> Ordering

(<) :: Rule -> Rule -> Bool

(<=) :: Rule -> Rule -> Bool

(>) :: Rule -> Rule -> Bool

(>=) :: Rule -> Rule -> Bool

max :: Rule -> Rule -> Rule

min :: Rule -> Rule -> Rule

type Rep Rule Source # 
Instance details

Defined in Skylighting.Types

type Rep Rule = D1 ('MetaData "Rule" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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 "rWordDelimiters") '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 

Instances

Instances details
Binary Context Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Context -> Put

get :: Get Context

putList :: [Context] -> Put

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

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

toConstr :: Context -> Constr

dataTypeOf :: Context -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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 "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

to :: Rep Context x -> Context

Read Context Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Context

readList :: ReadS [Context]

readPrec :: ReadPrec Context

readListPrec :: ReadPrec [Context]

Show Context Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Context -> ShowS

show :: Context -> String

showList :: [Context] -> ShowS

Eq Context Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Context -> Context -> Bool

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

Ord Context Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Context -> Context -> Ordering

(<) :: Context -> Context -> Bool

(<=) :: Context -> Context -> Bool

(>) :: Context -> Context -> Bool

(>=) :: Context -> Context -> Bool

max :: Context -> Context -> Context

min :: Context -> Context -> Context

type Rep Context Source # 
Instance details

Defined in Skylighting.Types

type Rep Context = D1 ('MetaData "Context" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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 "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

get :: Get ContextSwitch

putList :: [ContextSwitch] -> Put

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

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

toConstr :: ContextSwitch -> Constr

dataTypeOf :: ContextSwitch -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" 'False) (C1 ('MetaCons "Pop" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Push" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ContextName)))
Read ContextSwitch Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS ContextSwitch

readList :: ReadS [ContextSwitch]

readPrec :: ReadPrec ContextSwitch

readListPrec :: ReadPrec [ContextSwitch]

Show ContextSwitch Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> ContextSwitch -> ShowS

show :: ContextSwitch -> String

showList :: [ContextSwitch] -> ShowS

Eq ContextSwitch Source # 
Instance details

Defined in Skylighting.Types

Ord ContextSwitch Source # 
Instance details

Defined in Skylighting.Types

type Rep ContextSwitch Source # 
Instance details

Defined in Skylighting.Types

type Rep ContextSwitch = D1 ('MetaData "ContextSwitch" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

Instances

Instances details
Binary Syntax Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Syntax -> Put

get :: Get Syntax

putList :: [Syntax] -> Put

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

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

toConstr :: Syntax -> Constr

dataTypeOf :: Syntax -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep Syntax x -> Syntax

Read Syntax Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Syntax

readList :: ReadS [Syntax]

readPrec :: ReadPrec Syntax

readListPrec :: ReadPrec [Syntax]

Show Syntax Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Syntax -> ShowS

show :: Syntax -> String

showList :: [Syntax] -> ShowS

Eq Syntax Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Syntax -> Syntax -> Bool

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

Ord Syntax Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Syntax -> Syntax -> Ordering

(<) :: Syntax -> Syntax -> Bool

(<=) :: Syntax -> Syntax -> Bool

(>) :: Syntax -> Syntax -> Bool

(>=) :: Syntax -> Syntax -> Bool

max :: Syntax -> Syntax -> Syntax

min :: Syntax -> Syntax -> Syntax

type Rep Syntax Source # 
Instance details

Defined in Skylighting.Types

type Rep Syntax = D1 ('MetaData "Syntax" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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.

Instances

Instances details
FromJSON TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

parseJSON :: Value -> Parser TokenType

parseJSONList :: Value -> Parser [TokenType]

omittedField :: Maybe TokenType

FromJSONKey TokenType Source #

JSON Keyword corresponds to KeywordTok, and so on.

Instance details

Defined in Skylighting.Types

Methods

fromJSONKey :: FromJSONKeyFunction TokenType

fromJSONKeyList :: FromJSONKeyFunction [TokenType]

ToJSON TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

toJSON :: TokenType -> Value

toEncoding :: TokenType -> Encoding

toJSONList :: [TokenType] -> Value

toEncodingList :: [TokenType] -> Encoding

omitField :: TokenType -> Bool

ToJSONKey TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

toJSONKey :: ToJSONKeyFunction TokenType

toJSONKeyList :: ToJSONKeyFunction [TokenType]

Binary TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: TokenType -> Put

get :: Get TokenType

putList :: [TokenType] -> Put

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

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 :: forall r r'. (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

Bounded TokenType Source # 
Instance details

Defined in Skylighting.Types

Enum TokenType Source # 
Instance details

Defined in Skylighting.Types

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep TokenType x -> TokenType

Read TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS TokenType

readList :: ReadS [TokenType]

readPrec :: ReadPrec TokenType

readListPrec :: ReadPrec [TokenType]

Show TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> TokenType -> ShowS

show :: TokenType -> String

showList :: [TokenType] -> ShowS

Eq TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

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

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

Ord TokenType Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: TokenType -> TokenType -> Ordering

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

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

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

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

max :: TokenType -> TokenType -> TokenType

min :: TokenType -> TokenType -> TokenType

type Rep TokenType Source # 
Instance details

Defined in Skylighting.Types

type Rep TokenType = D1 ('MetaData "TokenType" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

Instances

Instances details
Enum LineNo Source # 
Instance details

Defined in Skylighting.Types

Show LineNo Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> LineNo -> ShowS

show :: LineNo -> String

showList :: [LineNo] -> ShowS

Styles

data TokenStyle Source #

A TokenStyle determines how a token is to be rendered.

Constructors

TokenStyle 

Fields

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

parseJSONList :: Value -> Parser [TokenStyle]

omittedField :: Maybe TokenStyle

ToJSON TokenStyle Source # 
Instance details

Defined in Skylighting.Types

Methods

toJSON :: TokenStyle -> Value

toEncoding :: TokenStyle -> Encoding

toJSONList :: [TokenStyle] -> Value

toEncodingList :: [TokenStyle] -> Encoding

omitField :: TokenStyle -> Bool

Binary TokenStyle Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: TokenStyle -> Put

get :: Get TokenStyle

putList :: [TokenStyle] -> Put

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

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 :: forall r r'. (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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep TokenStyle x -> TokenStyle

Read TokenStyle Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS TokenStyle

readList :: ReadS [TokenStyle]

readPrec :: ReadPrec TokenStyle

readListPrec :: ReadPrec [TokenStyle]

Show TokenStyle Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> TokenStyle -> ShowS

show :: TokenStyle -> String

showList :: [TokenStyle] -> ShowS

Eq TokenStyle Source # 
Instance details

Defined in Skylighting.Types

Methods

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

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

Ord TokenStyle Source # 
Instance details

Defined in Skylighting.Types

type Rep TokenStyle Source # 
Instance details

Defined in Skylighting.Types

type Rep TokenStyle = D1 ('MetaData "TokenStyle" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

parseJSONList :: Value -> Parser [Color]

omittedField :: Maybe Color

ToJSON Color Source # 
Instance details

Defined in Skylighting.Types

Methods

toJSON :: Color -> Value

toEncoding :: Color -> Encoding

toJSONList :: [Color] -> Value

toEncodingList :: [Color] -> Encoding

omitField :: Color -> Bool

Binary Color Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Color -> Put

get :: Get Color

putList :: [Color] -> Put

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

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 :: forall r r'. (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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep Color x -> Color

Read Color Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Color

readList :: ReadS [Color]

readPrec :: ReadPrec Color

readListPrec :: ReadPrec [Color]

Show Color Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Color -> ShowS

show :: Color -> String

showList :: [Color] -> ShowS

Eq Color Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Color -> Color -> Bool

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

Ord Color Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Color -> Color -> Ordering

(<) :: Color -> Color -> Bool

(<=) :: Color -> Color -> Bool

(>) :: Color -> Color -> Bool

(>=) :: Color -> Color -> Bool

max :: Color -> Color -> Color

min :: Color -> Color -> Color

type Rep Color Source # 
Instance details

Defined in Skylighting.Types

type Rep Color = D1 ('MetaData "Color" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

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

parseJSONList :: Value -> Parser [Style]

omittedField :: Maybe Style

ToJSON Style Source # 
Instance details

Defined in Skylighting.Types

Methods

toJSON :: Style -> Value

toEncoding :: Style -> Encoding

toJSONList :: [Style] -> Value

toEncodingList :: [Style] -> Encoding

omitField :: Style -> Bool

Binary Style Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: Style -> Put

get :: Get Style

putList :: [Style] -> Put

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

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 :: forall r r'. (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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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

to :: Rep Style x -> Style

Read Style Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS Style

readList :: ReadS [Style]

readPrec :: ReadPrec Style

readListPrec :: ReadPrec [Style]

Show Style Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> Style -> ShowS

show :: Style -> String

showList :: [Style] -> ShowS

Eq Style Source # 
Instance details

Defined in Skylighting.Types

Methods

(==) :: Style -> Style -> Bool

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

Ord Style Source # 
Instance details

Defined in Skylighting.Types

Methods

compare :: Style -> Style -> Ordering

(<) :: Style -> Style -> Bool

(<=) :: Style -> Style -> Bool

(>) :: Style -> Style -> Bool

(>=) :: Style -> Style -> Bool

max :: Style -> Style -> Style

min :: Style -> Style -> Style

type Rep Style Source # 
Instance details

Defined in Skylighting.Types

type Rep Style = D1 ('MetaData "Style" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

get :: Get ANSIColorLevel

putList :: [ANSIColorLevel] -> Put

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

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

toConstr :: ANSIColorLevel -> Constr

dataTypeOf :: ANSIColorLevel -> DataType

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

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

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

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

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

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

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

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

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

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

Bounded ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

Enum ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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)))
Read ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS ANSIColorLevel

readList :: ReadS [ANSIColorLevel]

readPrec :: ReadPrec ANSIColorLevel

readListPrec :: ReadPrec [ANSIColorLevel]

Show ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> ANSIColorLevel -> ShowS

show :: ANSIColorLevel -> String

showList :: [ANSIColorLevel] -> ShowS

Eq ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

Ord ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

type Rep ANSIColorLevel Source # 
Instance details

Defined in Skylighting.Types

type Rep ANSIColorLevel = D1 ('MetaData "ANSIColorLevel" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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

Instances

Instances details
Binary FormatOptions Source # 
Instance details

Defined in Skylighting.Types

Methods

put :: FormatOptions -> Put

get :: Get FormatOptions

putList :: [FormatOptions] -> Put

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

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

toConstr :: FormatOptions -> Constr

dataTypeOf :: FormatOptions -> DataType

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

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

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

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

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

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

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

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

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

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

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.15-L1iVPWJ0seC2AYqhhlMOkr" '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)))))
Read FormatOptions Source # 
Instance details

Defined in Skylighting.Types

Methods

readsPrec :: Int -> ReadS FormatOptions

readList :: ReadS [FormatOptions]

readPrec :: ReadPrec FormatOptions

readListPrec :: ReadPrec [FormatOptions]

Show FormatOptions Source # 
Instance details

Defined in Skylighting.Types

Methods

showsPrec :: Int -> FormatOptions -> ShowS

show :: FormatOptions -> String

showList :: [FormatOptions] -> ShowS

Eq FormatOptions Source # 
Instance details

Defined in Skylighting.Types

Ord FormatOptions Source # 
Instance details

Defined in Skylighting.Types

type Rep FormatOptions Source # 
Instance details

Defined in Skylighting.Types

type Rep FormatOptions = D1 ('MetaData "FormatOptions" "Skylighting.Types" "skylighting-core-0.15-L1iVPWJ0seC2AYqhhlMOkr" '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.