mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
review: use parser suggestion
This commit is contained in:
parent
1c0b1ba0af
commit
b39f0d98b7
2 changed files with 9 additions and 6 deletions
|
@ -249,10 +249,11 @@ fn to_expr_report<'a>(
|
|||
|
||||
Context::InDef(_pos) => {
|
||||
vec![alloc.stack([
|
||||
alloc.concat([alloc.reflow(
|
||||
"Did you mean to define a function? Condider defining this as",
|
||||
)]),
|
||||
alloc.vcat(vec![alloc.text("id = \\x -> x")]),
|
||||
alloc.reflow("Looks like you are trying to define a function. "),
|
||||
alloc.reflow("In roc, functions are always written as a lambda, like "),
|
||||
alloc
|
||||
.parser_suggestion("increment = \\n -> n + 1")
|
||||
.indent(4),
|
||||
])]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue