mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Improve debug printing for can decls
This commit is contained in:
parent
e549c8b4a3
commit
d2b9a1a33c
2 changed files with 10 additions and 7 deletions
|
@ -35,7 +35,10 @@ pub fn pretty_print_declarations(c: &Ctx, declarations: &Declarations) -> String
|
||||||
DeclarationTag::Expectation => todo!(),
|
DeclarationTag::Expectation => todo!(),
|
||||||
DeclarationTag::ExpectationFx => todo!(),
|
DeclarationTag::ExpectationFx => todo!(),
|
||||||
DeclarationTag::Destructure(_) => todo!(),
|
DeclarationTag::Destructure(_) => todo!(),
|
||||||
DeclarationTag::MutualRecursion { .. } => todo!(),
|
DeclarationTag::MutualRecursion { .. } => {
|
||||||
|
// the defs will be printed next
|
||||||
|
continue;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
defs.push(def);
|
defs.push(def);
|
||||||
|
@ -124,8 +127,9 @@ fn toplevel_function<'a>(
|
||||||
.append(f.text("\\"))
|
.append(f.text("\\"))
|
||||||
.append(f.intersperse(args, f.text(", ")))
|
.append(f.intersperse(args, f.text(", ")))
|
||||||
.append(f.text(" ->"))
|
.append(f.text(" ->"))
|
||||||
|
.group()
|
||||||
.append(f.line())
|
.append(f.line())
|
||||||
.append(expr(c, EPrec::Free, f, body))
|
.append(expr(c, EPrec::Free, f, body).group())
|
||||||
.nest(2)
|
.nest(2)
|
||||||
.group()
|
.group()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8612,8 +8612,7 @@ mod solve_expr {
|
||||||
|
|
||||||
map = \simpleParser, transform -> apply \{} -[12]-> transform simpleParser
|
map = \simpleParser, transform -> apply \{} -[12]-> transform simpleParser
|
||||||
|
|
||||||
parseInput =
|
parseInput = \{} ->
|
||||||
\{}->
|
|
||||||
when [
|
when [
|
||||||
map v1 \{} -[13]-> "",
|
map v1 \{} -[13]-> "",
|
||||||
map v2 \s -[14]-> s,
|
map v2 \s -[14]-> s,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue