Post #2204085
2026-05-07 05:37 UTC
The Show instance of this datatype just messed with me. I was trying to learn how to output rust files by parsing and printing out their ASTs. Somehow there was a haskell String showing up as the 2nd argument to TokenTree::Token. However, the 2nd argument to TokenTree::Token is supposed to be a value of *type* Token, which isn't a string. It confused me until I realized that Token must have a funny Show instance. That lead me to find Token::LiteralTok. :goosehonk:
https://hackage.haskell.org/package/language-rust-0.2.0.27/docs/src/Language.Rust.Syntax.Token.html#line-288
Replies (0)
No replies.