-----------------------------------------------------------------------------
-- |
-- Module      :  Text.Parser.Token.Highlight
-- Copyright   :  (C) 2011 Edward Kmett
-- License     :  BSD-style (see the file LICENSE)
--
-- Maintainer  :  Edward Kmett <ekmett@gmail.com>
-- Stability   :  experimental
-- Portability :  portable
--
-- Highlighting isn't strictly a parsing concern, but it makes more sense
-- to annotate a parser with highlighting information than to require
-- someone to completely reimplement all of the combinators to add
-- this functionality later when they need it.
--
----------------------------------------------------------------------------
module Text.Parser.Token.Highlight
  ( Highlight(..)
  ) where

-- | Tags used by the 'Text.Parser.Token.TokenParsing' 'Text.Parser.Token.highlight' combinator.
data Highlight
  = EscapeCode
  | Number
  | Comment
  | CharLiteral
  | StringLiteral
  | Constant
  | Statement
  | Special
  | Symbol
  | Identifier
  | ReservedIdentifier
  | Operator
  | ReservedOperator
  | Constructor
  | ReservedConstructor
  | ConstructorOperator
  | ReservedConstructorOperator
  | BadInput
  | Unbound
  | Layout
  | MatchedSymbols
  | LiterateComment
  | LiterateSyntax
  deriving (Highlight -> Highlight -> Bool
(Highlight -> Highlight -> Bool)
-> (Highlight -> Highlight -> Bool) -> Eq Highlight
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Highlight -> Highlight -> Bool
$c/= :: Highlight -> Highlight -> Bool
== :: Highlight -> Highlight -> Bool
$c== :: Highlight -> Highlight -> Bool
Eq,Eq Highlight
Eq Highlight
-> (Highlight -> Highlight -> Ordering)
-> (Highlight -> Highlight -> Bool)
-> (Highlight -> Highlight -> Bool)
-> (Highlight -> Highlight -> Bool)
-> (Highlight -> Highlight -> Bool)
-> (Highlight -> Highlight -> Highlight)
-> (Highlight -> Highlight -> Highlight)
-> Ord Highlight
Highlight -> Highlight -> Bool
Highlight -> Highlight -> Ordering
Highlight -> Highlight -> Highlight
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Highlight -> Highlight -> Highlight
$cmin :: Highlight -> Highlight -> Highlight
max :: Highlight -> Highlight -> Highlight
$cmax :: Highlight -> Highlight -> Highlight
>= :: Highlight -> Highlight -> Bool
$c>= :: Highlight -> Highlight -> Bool
> :: Highlight -> Highlight -> Bool
$c> :: Highlight -> Highlight -> Bool
<= :: Highlight -> Highlight -> Bool
$c<= :: Highlight -> Highlight -> Bool
< :: Highlight -> Highlight -> Bool
$c< :: Highlight -> Highlight -> Bool
compare :: Highlight -> Highlight -> Ordering
$ccompare :: Highlight -> Highlight -> Ordering
$cp1Ord :: Eq Highlight
Ord,Int -> Highlight -> ShowS
[Highlight] -> ShowS
Highlight -> String
(Int -> Highlight -> ShowS)
-> (Highlight -> String)
-> ([Highlight] -> ShowS)
-> Show Highlight
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Highlight] -> ShowS
$cshowList :: [Highlight] -> ShowS
show :: Highlight -> String
$cshow :: Highlight -> String
showsPrec :: Int -> Highlight -> ShowS
$cshowsPrec :: Int -> Highlight -> ShowS
Show,ReadPrec [Highlight]
ReadPrec Highlight
Int -> ReadS Highlight
ReadS [Highlight]
(Int -> ReadS Highlight)
-> ReadS [Highlight]
-> ReadPrec Highlight
-> ReadPrec [Highlight]
-> Read Highlight
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Highlight]
$creadListPrec :: ReadPrec [Highlight]
readPrec :: ReadPrec Highlight
$creadPrec :: ReadPrec Highlight
readList :: ReadS [Highlight]
$creadList :: ReadS [Highlight]
readsPrec :: Int -> ReadS Highlight
$creadsPrec :: Int -> ReadS Highlight
Read,Int -> Highlight
Highlight -> Int
Highlight -> [Highlight]
Highlight -> Highlight
Highlight -> Highlight -> [Highlight]
Highlight -> Highlight -> Highlight -> [Highlight]
(Highlight -> Highlight)
-> (Highlight -> Highlight)
-> (Int -> Highlight)
-> (Highlight -> Int)
-> (Highlight -> [Highlight])
-> (Highlight -> Highlight -> [Highlight])
-> (Highlight -> Highlight -> [Highlight])
-> (Highlight -> Highlight -> Highlight -> [Highlight])
-> Enum Highlight
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Highlight -> Highlight -> Highlight -> [Highlight]
$cenumFromThenTo :: Highlight -> Highlight -> Highlight -> [Highlight]
enumFromTo :: Highlight -> Highlight -> [Highlight]
$cenumFromTo :: Highlight -> Highlight -> [Highlight]
enumFromThen :: Highlight -> Highlight -> [Highlight]
$cenumFromThen :: Highlight -> Highlight -> [Highlight]
enumFrom :: Highlight -> [Highlight]
$cenumFrom :: Highlight -> [Highlight]
fromEnum :: Highlight -> Int
$cfromEnum :: Highlight -> Int
toEnum :: Int -> Highlight
$ctoEnum :: Int -> Highlight
pred :: Highlight -> Highlight
$cpred :: Highlight -> Highlight
succ :: Highlight -> Highlight
$csucc :: Highlight -> Highlight
Enum,Highlight
Highlight -> Highlight -> Bounded Highlight
forall a. a -> a -> Bounded a
maxBound :: Highlight
$cmaxBound :: Highlight
minBound :: Highlight
$cminBound :: Highlight
Bounded)