mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +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::ExpectationFx => todo!(),
|
||||
DeclarationTag::Destructure(_) => todo!(),
|
||||
DeclarationTag::MutualRecursion { .. } => todo!(),
|
||||
DeclarationTag::MutualRecursion { .. } => {
|
||||
// the defs will be printed next
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
defs.push(def);
|
||||
|
@ -123,9 +126,10 @@ fn toplevel_function<'a>(
|
|||
.append(f.line())
|
||||
.append(f.text("\\"))
|
||||
.append(f.intersperse(args, f.text(", ")))
|
||||
.append(f.text("->"))
|
||||
.append(f.text(" ->"))
|
||||
.group()
|
||||
.append(f.line())
|
||||
.append(expr(c, EPrec::Free, f, body))
|
||||
.append(expr(c, EPrec::Free, f, body).group())
|
||||
.nest(2)
|
||||
.group()
|
||||
}
|
||||
|
|
|
@ -8608,12 +8608,11 @@ mod solve_expr {
|
|||
|
||||
v2 = ""
|
||||
|
||||
apply = \fnParser, valParser-> \{} -[9]-> (fnParser {}) valParser
|
||||
apply = \fnParser, valParser -> \{} -[9]-> (fnParser {}) valParser
|
||||
|
||||
map = \simpleParser, transform-> apply \{} -[12]-> transform simpleParser
|
||||
map = \simpleParser, transform -> apply \{} -[12]-> transform simpleParser
|
||||
|
||||
parseInput =
|
||||
\{}->
|
||||
parseInput = \{} ->
|
||||
when [
|
||||
map v1 \{} -[13]-> "",
|
||||
map v2 \s -[14]-> s,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue