| Copyright | (c) Sergey Vinokurov 2019 |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
FastTags.LexerTypes
Description
Auxiliary types for lexer.
Synopsis
- data Context
- newtype AlexCode = AlexCode {
- unAlexCode :: Int
- data LitStyle
- data LitMode a
- = LitInside !a
- | LitOutside
- | LitVanilla
- isLiterateEnabled :: LitMode a -> Bool
- isLiterateBirdInside :: LitMode LitStyle -> Bool
- isLiterateLatexInside :: LitMode LitStyle -> Bool
Documentation
Whether we're currently in Haskell context or within Template Haskell quasiquoter and should discard as much as possible.
Constructors
| CtxHaskell | |
| CtxQuasiquoter |
Abstract wrapper around alex automata states.
Constructors
| AlexCode | |
Fields
| |
Instances
| Enum AlexCode Source # | |
Defined in FastTags.LexerTypes | |
| Eq AlexCode Source # | |
| Integral AlexCode Source # | |
Defined in FastTags.LexerTypes | |
| Num AlexCode Source # | |
| Ord AlexCode Source # | |
Defined in FastTags.LexerTypes | |
| Real AlexCode Source # | |
Defined in FastTags.LexerTypes Methods toRational :: AlexCode -> Rational # | |
| Show AlexCode Source # | |
| NFData AlexCode Source # | |
Defined in FastTags.LexerTypes | |
Literate style we're currently in.
Instances
| Bounded LitStyle Source # | |
| Enum LitStyle Source # | |
Defined in FastTags.LexerTypes | |
| Eq LitStyle Source # | |
| Ord LitStyle Source # | |
Defined in FastTags.LexerTypes | |
| Show LitStyle Source # | |
Literate mode of whole file. Either LitVanilla all the time, which means
it's non-literate file or LitOutside when looking at literate comments and
LitInside mode when lexing Haskell source with specific literate mode.
Constructors
| LitInside !a | |
| LitOutside | |
| LitVanilla |
Instances
| Functor LitMode Source # | |
| Eq a => Eq (LitMode a) Source # | |
| Ord a => Ord (LitMode a) Source # | |
| Show a => Show (LitMode a) Source # | |
isLiterateEnabled :: LitMode a -> Bool Source #