Token package:ghc
Tokens embedded in the AST have an EpaLocation, unless they come from
generated code (e.g. by TH).
Given a source location and a StringBuffer corresponding to this
location, return a rich token stream with the source associated to the
tokens.
Take a rich token stream such as produced from
getRichTokenStream and return source code almost identical to
the original code (except for insignificant whitespace.)
A token stored in the syntax tree. For example, when parsing a
let-expression, we store EpToken "let" and EpToken
"in". The locations of those tokens can be used to faithfully
reproduce (exactprint) the original program text.
With UnicodeSyntax, there might be multiple ways to write the
same token. For example an arrow could be either -> or
→. This choice must be recorded in order to exactprint such
tokens, so instead of EpToken "->" we introduce
EpUniToken "->" "→".