dusklang / dusk

The Dusk Programming Language
Other
0 stars 0 forks source link

Pretty-print types #123

Open zachwolfe opened 2 years ago

zachwolfe commented 2 years ago

I currently use a custom Debug implementation to print types, which–on top of not being very idiomatic Rust–is inadequate for a few reasons. For one thing, there is not enough context inline in the Type enum to print user-friendly names of custom types. QualTypes also get printed with Debug, which looks even dumber because it uses the custom Debug impl for Type and then wraps it in the stock Rust implementation of Debug for structs.