feat: allow line-wrapping when printing DiscrTree.Keys (#7200)
This PR allows the debug form of DiscrTree.Key to line-wrap.
This commit is contained in:
parent
e7dc0d31f4
commit
57c8ab269b
1 changed files with 5 additions and 4 deletions
|
|
@ -96,13 +96,14 @@ where
|
|||
if args.isEmpty then
|
||||
return f
|
||||
else
|
||||
let mut r := f
|
||||
let mut r := m!""
|
||||
for arg in args do
|
||||
r := r ++ m!" {arg}"
|
||||
r := r ++ Format.line ++ arg
|
||||
r := f ++ .nest 2 r
|
||||
if parenIfNonAtomic then
|
||||
return m!"({r})"
|
||||
return .paren r
|
||||
else
|
||||
return r
|
||||
return .group r
|
||||
|
||||
go (parenIfNonAtomic := true) : StateRefT (List Key) CoreM MessageData := do
|
||||
let some key ← next? | return .nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue