Unify functions fx vars

This commit is contained in:
Agus Zubiaga 2024-10-08 20:59:10 -03:00
parent 5a5abe3bc5
commit 7776883262
No known key found for this signature in database
26 changed files with 222 additions and 70 deletions

View file

@ -239,7 +239,8 @@ fn make_completion_item(
let typ = match subs.get(var).content {
roc_types::subs::Content::Structure(var) => match var {
roc_types::subs::FlatType::Apply(_, _) => CompletionItemKind::FUNCTION,
roc_types::subs::FlatType::Func(_, _, _) => CompletionItemKind::FUNCTION,
// [purity-inference] TODO: Categorize by purity?
roc_types::subs::FlatType::Func(_, _, _, _) => CompletionItemKind::FUNCTION,
roc_types::subs::FlatType::EmptyTagUnion
| roc_types::subs::FlatType::TagUnion(_, _) => CompletionItemKind::ENUM,
_ => CompletionItemKind::VARIABLE,