hscolour-1.25: Colourise Haskell code.

Safe Haskell | Safe-Inferred
Language | Haskell98

Language.Haskell.HsColour.Classify

Synopsis

- data TokenType
  - = Space
  - | Keyword
  - | Keyglyph
  - | Layout
  - | Comment
  - | Conid
  - | Varid
  - | Conop
  - | Varop
  - | String
  - | Char
  - | Number
  - | Cpp
  - | Error
  - | Definition
- tokenise :: String -> [(TokenType, String)]

# Documentation

data TokenType Source #

Classification of tokens as lexical entities

Constructors

Space |
Keyword |
Keyglyph |
Layout |
Comment |
Conid |
Varid |
Conop |
Varop |
String |
Char |
Number |
Cpp |
Error |
Definition |

#### Instances

Instances details

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

tokenise :: String -> [(TokenType, String)] Source #

Lex Haskell source code into an annotated token stream, without discarding any characters or layout.