Copyright | (c) Sergey Vinokurov 2019 |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
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.
Abstract wrapper around alex automata states.
Instances
Enum AlexCode Source # | |
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 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 # | |
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
.
isLiterateEnabled :: LitMode a -> Bool Source #