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.
Give even more information on the source than getTokenStream This function allows reconstructing the source completely with showRichTokenStream.
Return module source as token stream, including comments. A Module can be turned into a ModSummary using getModSummary if your session is fully initialised. Throws a SourceError on parse error.
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 "->" "→".