Safe Haskell | Safe-Inferred |
---|
Documentation
class Show a => IsToken a whereSource
The IsToken class captures the different token type in use. For
GHC it represents the type returned by getRichTokenStream
,
namely [(GHC.Located GHC.Token, String)]
For haskell-src-exts this is the reult of lexTokenStream
, namely `[HSE.Loc HSE.Token]`
putSpan :: a -> Span -> aSource
tokenLen returns the length of the string representation of the token, not just the difference in the location, as the string may have changed without the position being updated, e.g. in a renaming
Zero-length tokens, as appear in GHC as markers
tokenToString :: a -> StringSource
showTokenStream :: [a] -> StringSource