mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Improve error message
This commit is contained in:
parent
02e1a98cac
commit
13a17f1858
2 changed files with 17 additions and 0 deletions
|
@ -615,6 +615,16 @@ pub fn can_problem<'b>(
|
|||
alloc.reflow(":"),
|
||||
]),
|
||||
alloc.region(lines.convert_region(region)),
|
||||
alloc.concat(vec![
|
||||
alloc.reflow("Abilities are not types, but you can add an ability constraint to a type variable "),
|
||||
alloc.type_variable("a".into()),
|
||||
alloc.reflow(" by writing"),
|
||||
]),
|
||||
alloc.type_block(alloc.concat(vec![
|
||||
alloc.reflow("| a has "),
|
||||
alloc.symbol_unqualified(ability),
|
||||
])),
|
||||
alloc.reflow(" at the end of the type."),
|
||||
]);
|
||||
title = ALIAS_USES_ABILITY.to_string();
|
||||
severity = Severity::RuntimeError;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue