yi-mode-haskell-0.19.1: Yi editor haskell mode

Safe Haskell | None
Language | Haskell2010

Yi.Lexer.Haskell

Synopsis

- initState :: HlState
- alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
- tokenToStyle :: Token -> StyleName
- tokenToText :: Token -> Maybe String
- type TT = Tok Token
- isErrorTok :: Token -> Bool
- isSpecial :: String -> Token -> Bool
- startsLayout :: Token -> Bool
- isComment :: Token -> Bool
- data Token
  - = Number
  - | CharTok
  - | StringTok
  - | VarIdent
  - | ConsIdent
  - | Reserved !ReservedType
  - | ReservedOp !OpType
  - | Special Char
  - | ConsOperator String
  - | Operator String
  - | Comment !CommentType
  - | THQuote
  - | CppDirective
  - | Unrecognized
- type HlState = Int
- data CommentType
  - = Open
  - | Close
  - | Text
  - | Line
- data ReservedType
  - = Hiding
  - | Qualified
  - | As
  - | Import
  - | Data
  - | NewType
  - | Type
  - | Where
  - | Let
  - | In
  - | Do
  - | Of
  - | OtherLayout
  - | Deriving
  - | Module
  - | Forall
  - | Other
  - | Class
  - | Instance
- data OpType
  - = Pipe
  - | Equal
  - | BackSlash
  - | LeftArrow
  - | RightArrow
  - | DoubleRightArrow
  - | DoubleColon
  - | DoubleDot
  - | Arobase
  - | Tilda

# Documentation

initState :: HlState Source #

alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput)) Source #

Scan one token. Return (maybe) a token and a new state.

tokenToStyle :: Token -> StyleName Source #

tokenToText :: Token -> Maybe String Source #

type TT = Tok Token Source #

isErrorTok :: Token -> Bool Source #

isSpecial :: String -> Token -> Bool Source #

startsLayout :: Token -> Bool Source #

isComment :: Token -> Bool Source #

data Token Source #

Constructors

Number |
CharTok |
StringTok |
VarIdent |
ConsIdent |
Reserved !ReservedType |
ReservedOp !OpType |
Special Char |
ConsOperator String |
Operator String |
Comment !CommentType |
THQuote |
CppDirective |
Unrecognized |

#### Instances

Instances details

Show Token Source # |
Instance details Defined in Yi.Lexer.Haskell Methods showsPrec :: Int -> Token -> ShowS Source # show :: Token -> String Source # showList :: [Token] -> ShowS Source #
Eq Token Source # |
Instance details Defined in Yi.Lexer.Haskell Methods (==) :: Token -> Token -> Bool Source # (/=) :: Token -> Token -> Bool Source #

type HlState = Int Source #

data CommentType Source #

Constructors

Open |
Close |
Text |
Line |

#### Instances

Instances details

Show CommentType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods showsPrec :: Int -> CommentType -> ShowS Source # show :: CommentType -> String Source # showList :: [CommentType] -> ShowS Source #
Eq CommentType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods (==) :: CommentType -> CommentType -> Bool Source # (/=) :: CommentType -> CommentType -> Bool Source #

data ReservedType Source #

Constructors

Hiding |
Qualified |
As |
Import |
Data |
NewType |
Type |
Where |
Let |
In |
Do |
Of |
OtherLayout |
Deriving |
Module |
Forall |
Other |
Class |
Instance |

#### Instances

Instances details

Show ReservedType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods showsPrec :: Int -> ReservedType -> ShowS Source # show :: ReservedType -> String Source # showList :: [ReservedType] -> ShowS Source #
Eq ReservedType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods (==) :: ReservedType -> ReservedType -> Bool Source # (/=) :: ReservedType -> ReservedType -> Bool Source #

data OpType Source #

Constructors

Pipe |
Equal |
BackSlash |
LeftArrow |
RightArrow |
DoubleRightArrow |
DoubleColon |
DoubleDot |
Arobase |
Tilda |

#### Instances

Instances details

Show OpType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods showsPrec :: Int -> OpType -> ShowS Source # show :: OpType -> String Source # showList :: [OpType] -> ShowS Source #
Eq OpType Source # |
Instance details Defined in Yi.Lexer.Haskell Methods (==) :: OpType -> OpType -> Bool Source # (/=) :: OpType -> OpType -> Bool Source #