mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
Replace flex vars with lambda set vars during type_to_var
This commit is contained in:
parent
44ecb13033
commit
a2906995e0
1 changed files with 7 additions and 1 deletions
|
@ -2452,12 +2452,18 @@ impl AmbientFunctionPolicy {
|
||||||
ambient_function,
|
ambient_function,
|
||||||
}),
|
}),
|
||||||
Content::FlexVar(_) => {
|
Content::FlexVar(_) => {
|
||||||
|
Content::LambdaSet(LambdaSet {
|
||||||
|
solved: UnionLabels::default(),
|
||||||
|
recursion_var: OptVariable::NONE,
|
||||||
|
unspecialized: SubsSlice::default(),
|
||||||
|
ambient_function,
|
||||||
|
})
|
||||||
// Something like
|
// Something like
|
||||||
// Encoder fmt <a> : List U8, fmt -a-> List U8 | fmt has EncoderFormatting
|
// Encoder fmt <a> : List U8, fmt -a-> List U8 | fmt has EncoderFormatting
|
||||||
// THEORY: Just allow this, it's fine, because the lambda set is unbound,
|
// THEORY: Just allow this, it's fine, because the lambda set is unbound,
|
||||||
// but it's not part of an ability signature, so it doesn't have an unspecialized
|
// but it's not part of an ability signature, so it doesn't have an unspecialized
|
||||||
// lambda set, and hence doesn't need a link to the ambient function.
|
// lambda set, and hence doesn't need a link to the ambient function.
|
||||||
*content
|
// *content
|
||||||
}
|
}
|
||||||
content => internal_error!("{:?}({:?}) not a lambda set", content, var),
|
content => internal_error!("{:?}({:?}) not a lambda set", content, var),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue