mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Print function argument layouts in pretty mode
This commit is contained in:
parent
991b99250c
commit
9ffe6eb6dd
1 changed files with 10 additions and 4 deletions
|
@ -343,10 +343,16 @@ impl<'a> Proc<'a> {
|
|||
D::Doc: Clone,
|
||||
A: Clone,
|
||||
{
|
||||
let args_doc = self
|
||||
.args
|
||||
.iter()
|
||||
.map(|(_, symbol)| symbol_to_doc(alloc, *symbol));
|
||||
let args_doc = self.args.iter().map(|(layout, symbol)| {
|
||||
let arg_doc = symbol_to_doc(alloc, *symbol);
|
||||
if pretty_print_ir_symbols() {
|
||||
arg_doc
|
||||
.append(alloc.reflow(": "))
|
||||
.append(layout.to_doc(alloc, Parens::NotNeeded))
|
||||
} else {
|
||||
arg_doc
|
||||
}
|
||||
});
|
||||
|
||||
if pretty_print_ir_symbols() {
|
||||
alloc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue