Zulip Chat Archive
Stream: general
Topic: Idiomatic way to get a text representation of a type?
Greg Shuflin (Dec 08 2024 at 03:30):
What's the idiomatic way to get and print a textual representation of an intermediate data structure - in my case I want to see what a Std.HashMap Nat Nat looks like - for debugging logic? i.e. the sort of thing you'd reach for the Debug
trait to print in Rust?
Eric Wieser (Dec 08 2024 at 04:07):
docs#Repr, docs#ToString, and docs#Lean.ToExpr are all reasonable options
James Sully (Dec 09 2024 at 11:07):
also docs#dbg_trace
James Sully (Dec 09 2024 at 11:10):
oop it's a 404. But it's a thing
Last updated: May 02 2025 at 03:31 UTC