mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Pretty-print laayouts when PRETTY_PRINT_IR_SYMBOLS is true
This commit is contained in:
parent
abe42781d5
commit
103e85f339
1 changed files with 13 additions and 10 deletions
|
@ -1632,16 +1632,19 @@ impl<'a> Stmt<'a> {
|
||||||
use Stmt::*;
|
use Stmt::*;
|
||||||
|
|
||||||
match self {
|
match self {
|
||||||
Let(symbol, expr, _layout, cont) => alloc
|
Let(symbol, expr, layout, cont) => {
|
||||||
.text("let ")
|
let mut doc = alloc.text("let ").append(symbol_to_doc(alloc, *symbol));
|
||||||
.append(symbol_to_doc(alloc, *symbol))
|
if PRETTY_PRINT_IR_SYMBOLS {
|
||||||
//.append(" : ")
|
doc = doc
|
||||||
//.append(alloc.text(format!("{:?}", _layout)))
|
.append(" : ")
|
||||||
.append(" = ")
|
.append(alloc.text(format!("{:?}", layout)));
|
||||||
.append(expr.to_doc(alloc))
|
}
|
||||||
.append(";")
|
doc.append(" = ")
|
||||||
.append(alloc.hardline())
|
.append(expr.to_doc(alloc))
|
||||||
.append(cont.to_doc(alloc)),
|
.append(";")
|
||||||
|
.append(alloc.hardline())
|
||||||
|
.append(cont.to_doc(alloc))
|
||||||
|
}
|
||||||
|
|
||||||
Refcounting(modify, cont) => modify
|
Refcounting(modify, cont) => modify
|
||||||
.to_doc(alloc)
|
.to_doc(alloc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue