mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects
This commit is contained in:
commit
dbd0d30893
98 changed files with 4649 additions and 1433 deletions
|
@ -86,7 +86,7 @@ pub enum RecordField {
|
|||
pub struct AbilityMember {
|
||||
pub name: String,
|
||||
pub type_annotation: TypeAnnotation,
|
||||
pub able_variables: Vec<(String, TypeAnnotation)>,
|
||||
pub able_variables: Vec<(String, Vec<TypeAnnotation>)>,
|
||||
pub docs: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -387,17 +387,20 @@ fn type_to_docs(in_func_type_ann: bool, type_annotation: ast::TypeAnnotation) ->
|
|||
|
||||
fn ability_member_type_to_docs(
|
||||
type_annotation: ast::TypeAnnotation,
|
||||
) -> (TypeAnnotation, Vec<(String, TypeAnnotation)>) {
|
||||
) -> (TypeAnnotation, Vec<(String, Vec<TypeAnnotation>)>) {
|
||||
match type_annotation {
|
||||
ast::TypeAnnotation::Where(ta, has_clauses) => {
|
||||
let ta = type_to_docs(false, ta.value);
|
||||
let has_clauses = has_clauses
|
||||
.iter()
|
||||
.map(|hc| {
|
||||
let ast::HasClause { var, ability } = hc.value;
|
||||
let ast::HasClause { var, abilities } = hc.value;
|
||||
(
|
||||
var.value.extract_spaces().item.to_string(),
|
||||
type_to_docs(false, ability.value),
|
||||
abilities
|
||||
.iter()
|
||||
.map(|ability| type_to_docs(false, ability.value))
|
||||
.collect(),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
|
|
@ -4471,7 +4471,7 @@ fn run_solve_solve(
|
|||
.values()
|
||||
.any(|resolved_impl| match resolved_impl {
|
||||
ResolvedImpl::Impl(specialization) => specialization.symbol == sym,
|
||||
ResolvedImpl::Derived | ResolvedImpl::Error => false,
|
||||
ResolvedImpl::Error => false,
|
||||
})
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue