mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-29 09:23:46 +00:00
Unannotated types hover
This commit is contained in:
parent
cdf218fe7a
commit
0b56882785
2 changed files with 14 additions and 3 deletions
|
@ -239,8 +239,20 @@ fn generate_entry_docs(
|
|||
}
|
||||
}
|
||||
|
||||
ValueDef::Body(_, _) => {
|
||||
// TODO generate docs for un-annotated bodies
|
||||
ValueDef::Body(pattern, _) => {
|
||||
if let Pattern::Identifier(identifier) = pattern.value {
|
||||
// Check if this module exposes the def
|
||||
if let Some(ident_id) = ident_ids.get_id(identifier) {
|
||||
let doc_def = DocDef {
|
||||
name: identifier.to_string(),
|
||||
type_annotation: TypeAnnotation::NoTypeAnn,
|
||||
type_vars: Vec::new(),
|
||||
symbol: Symbol::new(home, ident_id),
|
||||
docs,
|
||||
};
|
||||
acc.push(DocEntry::DocDef(doc_def));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ValueDef::Dbg { .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue