cleanup, improve docs

This commit is contained in:
Luke Boswell 2024-04-12 15:10:16 +10:00
parent c32fa5b600
commit 0143035dc0
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
8 changed files with 42 additions and 60 deletions

View file

@ -212,7 +212,6 @@ fn generate_entry_docs(
match either_index.split() {
Err(value_index) => match &defs.value_defs[value_index.index()] {
ValueDef::Annotation(loc_pattern, loc_ann) => {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: identifier,
suffixed: _,
@ -238,7 +237,6 @@ fn generate_entry_docs(
ann_type,
..
} => {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: identifier,
suffixed: _,
@ -259,7 +257,6 @@ fn generate_entry_docs(
}
ValueDef::Body(pattern, _) => {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: identifier,
suffixed: _,
@ -292,7 +289,6 @@ fn generate_entry_docs(
}
ValueDef::Stmt(loc_expr) => {
// TODO is this right for suffixed??
if let roc_parse::ast::Expr::Var {
ident: identifier, ..
} = loc_expr.value
@ -320,7 +316,6 @@ fn generate_entry_docs(
let mut type_vars = Vec::new();
for var in vars.iter() {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: ident_name,
suffixed: _,
@ -359,7 +354,6 @@ fn generate_entry_docs(
let mut type_vars = Vec::new();
for var in vars.iter() {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: ident_name,
suffixed: _,
@ -388,7 +382,6 @@ fn generate_entry_docs(
let mut type_vars = Vec::new();
for var in vars.iter() {
// TODO is this right for suffixed??
if let Pattern::Identifier {
ident: ident_name,
suffixed: _,
@ -655,7 +648,6 @@ fn type_to_docs(in_func_type_ann: bool, type_annotation: ast::TypeAnnotation) ->
.vars
.iter()
.filter_map(|loc_pattern| match loc_pattern.value {
// TODO is this right for suffixed??
ast::Pattern::Identifier { ident, suffixed: _ } => Some(ident.to_string()),
_ => None,
})

View file

@ -5985,11 +5985,6 @@ fn build_pending_specializations<'a>(
// this seems to work for now
*shadowed
}
Pattern::RecordDestructure { .. } => {
// this seems to work for now, we added to enable suffixed expressions
// the issue is likely that we can have a `main = say! "hi"` which is
symbol
}
_ => todo!("top-level destrucuture patterns are not implemented"),
};