cryptol-3.0.0: Cryptol: The Language of Cryptography

Safe Haskell | Safe
Language | Haskell2010

Cryptol.Parser.Token

Synopsis

- data Token = Token {
  - tokenType :: !TokenT
  - tokenText :: !Text
  }
- data TokenV
  - = VCurlyL
  - | VCurlyR
  - | VSemi
- data TokenW
  - = BlockComment
  - | LineComment
  - | Space
  - | DocStr
- data TokenKW
  - = KW_else
  - | KW_fin
  - | KW_if
  - | KW_private
  - | KW_include
  - | KW_inf
  - | KW_lg2
  - | KW_lengthFromThen
  - | KW_lengthFromThenTo
  - | KW_max
  - | KW_min
  - | KW_module
  - | KW_submodule
  - | KW_newtype
  - | KW_pragma
  - | KW_property
  - | KW_then
  - | KW_type
  - | KW_where
  - | KW_let
  - | KW_x
  - | KW_import
  - | KW_as
  - | KW_hiding
  - | KW_infixl
  - | KW_infixr
  - | KW_infix
  - | KW_primitive
  - | KW_parameter
  - | KW_constraint
  - | KW_interface
  - | KW_foreign
  - | KW_Prop
  - | KW_by
  - | KW_down
- data TokenOp
  - = Plus
  - | Minus
  - | Mul
  - | Div
  - | Exp
  - | Mod
  - | Equal
  - | LEQ
  - | GEQ
  - | Complement
  - | Hash
  - | At
  - | Other [Text] Text
- data TokenSym
  - = Bar
  - | ArrL
  - | ArrR
  - | FatArrR
  - | Lambda
  - | EqDef
  - | Comma
  - | Semi
  - | Dot
  - | DotDot
  - | DotDotDot
  - | DotDotLt
  - | DotDotGt
  - | Colon
  - | BackTick
  - | ParenL
  - | ParenR
  - | BracketL
  - | BracketR
  - | CurlyL
  - | CurlyR
  - | TriL
  - | TriR
  - | Lt
  - | Gt
  - | Underscore
- data TokenErr
  - = UnterminatedComment
  - | UnterminatedString
  - | UnterminatedChar
  - | InvalidString
  - | InvalidChar
  - | LexicalError
  - | MalformedLiteral
  - | MalformedSelector
  - | InvalidIndentation TokenT
- data SelectorType
  - = RecordSelectorTok Text
  - | TupleSelectorTok Int
- data TokenT
  - = Num !Integer !Int !Int
  - | Frac !Rational !Int
  - | ChrLit !Char
  - | Ident ![Text] !Text
  - | StrLit !String
  - | Selector !SelectorType
  - | KW !TokenKW
  - | Op !TokenOp
  - | Sym !TokenSym
  - | Virt !TokenV
  - | White !TokenW
  - | Err !TokenErr
  - | EOF

# Documentation

data Token Source #

Constructors

Token |

Fields

- tokenType :: !TokenT
- tokenText :: !Text

#### Instances

Instances details

Generic Token Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep Token :: Type -> Type Source # Methods from :: Token -> Rep Token x Source # to :: Rep Token x -> Token Source #
Show Token Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> Token -> ShowS Source # show :: Token -> String Source # showList :: [Token] -> ShowS Source #
PP Token Source # |
Instance details Defined in Cryptol.Parser.Token Methods ppPrec :: Int -> Token -> Doc Source #
NFData Token Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: Token -> () Source #
type Rep Token Source # |
Instance details Defined in Cryptol.Parser.Token type Rep Token = D1 ('MetaData "Token" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (C1 ('MetaCons "Token" 'PrefixI 'True) (S1 ('MetaSel ('Just "tokenType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenT) :*: S1 ('MetaSel ('Just "tokenText") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data TokenV Source #

Virtual tokens, inserted by layout processing.

Constructors

VCurlyL |
VCurlyR |
VSemi |

#### Instances

Instances details

Generic TokenV Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenV :: Type -> Type Source # Methods from :: TokenV -> Rep TokenV x Source # to :: Rep TokenV x -> TokenV Source #
Show TokenV Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenV -> ShowS Source # show :: TokenV -> String Source # showList :: [TokenV] -> ShowS Source #
NFData TokenV Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenV -> () Source #
Eq TokenV Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenV -> TokenV -> Bool Source # (/=) :: TokenV -> TokenV -> Bool Source #
type Rep TokenV Source # |
Instance details Defined in Cryptol.Parser.Token type Rep TokenV = D1 ('MetaData "TokenV" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (C1 ('MetaCons "VCurlyL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VCurlyR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VSemi" 'PrefixI 'False) (U1 :: Type -> Type)))

data TokenW Source #

Constructors

BlockComment |
LineComment |
Space |
DocStr |

#### Instances

Instances details

Generic TokenW Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenW :: Type -> Type Source # Methods from :: TokenW -> Rep TokenW x Source # to :: Rep TokenW x -> TokenW Source #
Show TokenW Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenW -> ShowS Source # show :: TokenW -> String Source # showList :: [TokenW] -> ShowS Source #
NFData TokenW Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenW -> () Source #
Eq TokenW Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenW -> TokenW -> Bool Source # (/=) :: TokenW -> TokenW -> Bool Source #
type Rep TokenW Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenW = D1 ('MetaData "TokenW" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) ((C1 ('MetaCons "BlockComment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineComment" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DocStr" 'PrefixI 'False) (U1 :: Type -> Type)))

data TokenKW Source #

Constructors

KW_else |
KW_fin |
KW_if |
KW_private |
KW_include |
KW_inf |
KW_lg2 |
KW_lengthFromThen |
KW_lengthFromThenTo |
KW_max |
KW_min |
KW_module |
KW_submodule |
KW_newtype |
KW_pragma |
KW_property |
KW_then |
KW_type |
KW_where |
KW_let |
KW_x |
KW_import |
KW_as |
KW_hiding |
KW_infixl |
KW_infixr |
KW_infix |
KW_primitive |
KW_parameter |
KW_constraint |
KW_interface |
KW_foreign |
KW_Prop |
KW_by |
KW_down |

#### Instances

Instances details

Generic TokenKW Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenKW :: Type -> Type Source # Methods from :: TokenKW -> Rep TokenKW x Source # to :: Rep TokenKW x -> TokenKW Source #
Show TokenKW Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenKW -> ShowS Source # show :: TokenKW -> String Source # showList :: [TokenKW] -> ShowS Source #
NFData TokenKW Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenKW -> () Source #
Eq TokenKW Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenKW -> TokenKW -> Bool Source # (/=) :: TokenKW -> TokenKW -> Bool Source #
type Rep TokenKW Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenKW = D1 ('MetaData "TokenKW" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (((((C1 ('MetaCons "KW_else" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_fin" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_if" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_private" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "KW_include" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_inf" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_lg2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_lengthFromThen" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "KW_lengthFromThenTo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_max" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_min" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_module" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "KW_submodule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_newtype" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_pragma" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KW_property" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_then" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "KW_type" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_where" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_let" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_x" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "KW_import" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_as" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_hiding" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KW_infixl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_infixr" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "KW_infix" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_primitive" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_parameter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_constraint" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "KW_interface" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_foreign" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KW_Prop" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KW_by" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KW_down" 'PrefixI 'False) (U1 :: Type -> Type)))))))

data TokenOp Source #

The named operators are a special case for parsing types, and `Other` is used for all other cases that lexed as an operator.

Constructors

Plus |
Minus |
Mul |
Div |
Exp |
Mod |
Equal |
LEQ |
GEQ |
Complement |
Hash |
At |
Other [Text] Text |

#### Instances

Instances details

Generic TokenOp Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenOp :: Type -> Type Source # Methods from :: TokenOp -> Rep TokenOp x Source # to :: Rep TokenOp x -> TokenOp Source #
Show TokenOp Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenOp -> ShowS Source # show :: TokenOp -> String Source # showList :: [TokenOp] -> ShowS Source #
NFData TokenOp Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenOp -> () Source #
Eq TokenOp Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenOp -> TokenOp -> Bool Source # (/=) :: TokenOp -> TokenOp -> Bool Source #
type Rep TokenOp Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenOp = D1 ('MetaData "TokenOp" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (((C1 ('MetaCons "Plus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Minus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mul" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Div" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Exp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mod" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Equal" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LEQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GEQ" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Complement" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Hash" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "At" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Other" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))))

data TokenSym Source #

Constructors

Bar |
ArrL |
ArrR |
FatArrR |
Lambda |
EqDef |
Comma |
Semi |
Dot |
DotDot |
DotDotDot |
DotDotLt |
DotDotGt |
Colon |
BackTick |
ParenL |
ParenR |
BracketL |
BracketR |
CurlyL |
CurlyR |
TriL |
TriR |
Lt |
Gt |
Underscore |

#### Instances

Instances details

Generic TokenSym Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenSym :: Type -> Type Source # Methods from :: TokenSym -> Rep TokenSym x Source # to :: Rep TokenSym x -> TokenSym Source #
Show TokenSym Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenSym -> ShowS Source # show :: TokenSym -> String Source # showList :: [TokenSym] -> ShowS Source #
NFData TokenSym Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenSym -> () Source #
Eq TokenSym Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenSym -> TokenSym -> Bool Source # (/=) :: TokenSym -> TokenSym -> Bool Source #
type Rep TokenSym Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenSym = D1 ('MetaData "TokenSym" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) ((((C1 ('MetaCons "Bar" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ArrL" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ArrR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "FatArrR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Lambda" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqDef" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Semi" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Dot" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DotDot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DotDotDot" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DotDotLt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DotDotGt" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Colon" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BackTick" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParenL" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ParenR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BracketL" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BracketR" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CurlyL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CurlyR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TriL" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TriR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Gt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Underscore" 'PrefixI 'False) (U1 :: Type -> Type))))))

data TokenErr Source #

Constructors

UnterminatedComment |
UnterminatedString |
UnterminatedChar |
InvalidString |
InvalidChar |
LexicalError |
MalformedLiteral |
MalformedSelector |
InvalidIndentation TokenT |

#### Instances

Instances details

Generic TokenErr Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenErr :: Type -> Type Source # Methods from :: TokenErr -> Rep TokenErr x Source # to :: Rep TokenErr x -> TokenErr Source #
Show TokenErr Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenErr -> ShowS Source # show :: TokenErr -> String Source # showList :: [TokenErr] -> ShowS Source #
NFData TokenErr Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenErr -> () Source #
Eq TokenErr Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenErr -> TokenErr -> Bool Source # (/=) :: TokenErr -> TokenErr -> Bool Source #
type Rep TokenErr Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenErr = D1 ('MetaData "TokenErr" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (((C1 ('MetaCons "UnterminatedComment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnterminatedString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnterminatedChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidString" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InvalidChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LexicalError" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MalformedLiteral" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MalformedSelector" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidIndentation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenT))))))

data SelectorType Source #

Constructors

RecordSelectorTok Text |
TupleSelectorTok Int |

#### Instances

Instances details

Generic SelectorType Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep SelectorType :: Type -> Type Source # Methods from :: SelectorType -> Rep SelectorType x Source # to :: Rep SelectorType x -> SelectorType Source #
Show SelectorType Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> SelectorType -> ShowS Source # show :: SelectorType -> String Source # showList :: [SelectorType] -> ShowS Source #
NFData SelectorType Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: SelectorType -> () Source #
Eq SelectorType Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: SelectorType -> SelectorType -> Bool Source # (/=) :: SelectorType -> SelectorType -> Bool Source #
type Rep SelectorType Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep SelectorType = D1 ('MetaData "SelectorType" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (C1 ('MetaCons "RecordSelectorTok" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "TupleSelectorTok" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data TokenT Source #

Constructors

Num !Integer !Int !Int | value, base, number of digits
Frac !Rational !Int | value, base.
ChrLit !Char | character literal
Ident ![Text] !Text | (qualified) identifier
StrLit !String | string literal
Selector !SelectorType | .hello or .123
KW !TokenKW | keyword
Op !TokenOp | operator
Sym !TokenSym | symbol
Virt !TokenV | virtual token (for layout)
White !TokenW | white space token
Err !TokenErr | error token
EOF |

#### Instances

Instances details

Generic TokenT Source # |
Instance details Defined in Cryptol.Parser.Token Associated Types type Rep TokenT :: Type -> Type Source # Methods from :: TokenT -> Rep TokenT x Source # to :: Rep TokenT x -> TokenT Source #
Show TokenT Source # |
Instance details Defined in Cryptol.Parser.Token Methods showsPrec :: Int -> TokenT -> ShowS Source # show :: TokenT -> String Source # showList :: [TokenT] -> ShowS Source #
NFData TokenT Source # |
Instance details Defined in Cryptol.Parser.Token Methods rnf :: TokenT -> () Source #
Eq TokenT Source # |
Instance details Defined in Cryptol.Parser.Token Methods (==) :: TokenT -> TokenT -> Bool Source # (/=) :: TokenT -> TokenT -> Bool Source #
type Rep TokenT Source # |

Instance details

Defined in Cryptol.Parser.Token

type Rep TokenT = D1 ('MetaData "TokenT" "Cryptol.Parser.Token" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (((C1 ('MetaCons "Num" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "Frac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "ChrLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)))) :+: (C1 ('MetaCons "Ident" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "StrLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Selector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SelectorType))))) :+: ((C1 ('MetaCons "KW" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenKW)) :+: (C1 ('MetaCons "Op" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenOp)) :+: C1 ('MetaCons "Sym" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenSym)))) :+: ((C1 ('MetaCons "Virt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenV)) :+: C1 ('MetaCons "White" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenW))) :+: (C1 ('MetaCons "Err" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TokenErr)) :+: C1 ('MetaCons "EOF" 'PrefixI 'False) (U1 :: Type -> Type)))))