mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Treat untyped suffixed functions as effectful
This commit is contained in:
parent
af6fc6306f
commit
cfc4be5254
25 changed files with 139 additions and 21 deletions
|
@ -984,7 +984,7 @@ fn deep_copy_type_vars<C: CopyEnv>(
|
|||
|
||||
// Everything else is a mechanical descent.
|
||||
Structure(flat_type) => match flat_type {
|
||||
EmptyRecord | EmptyTagUnion => Structure(flat_type),
|
||||
EmptyRecord | EmptyTagUnion | EffectfulFunc => Structure(flat_type),
|
||||
Apply(symbol, arguments) => {
|
||||
descend_slice!(arguments);
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ fn index_var(
|
|||
}
|
||||
Content::Structure(structure) => match structure {
|
||||
FlatType::Func(_, _, _, _) => return Err(TypeError),
|
||||
FlatType::EffectfulFunc => return Err(TypeError),
|
||||
FlatType::Apply(Symbol::LIST_LIST, args) => {
|
||||
match (subs.get_subs_slice(*args), ctor) {
|
||||
([elem_var], IndexCtor::List) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue