Do not use const fx vars when canonicalizing annotations

This commit is contained in:
Agus Zubiaga 2024-10-08 21:32:05 -03:00
parent 7776883262
commit b9b85a222f
No known key found for this signature in database
4 changed files with 65 additions and 20 deletions

View file

@ -591,11 +591,10 @@ fn can_annotation_help(
introduced_variables.insert_lambda_set(lambda_set);
let closure = Type::Variable(lambda_set);
let fx_var = match arrow {
FunctionArrow::Pure => Variable::PURE,
FunctionArrow::Effectful => Variable::EFFECTFUL,
let fx_type = match arrow {
FunctionArrow::Pure => Type::Pure,
FunctionArrow::Effectful => Type::Effectful,
};
let fx_type = Type::Variable(fx_var);
Type::Function(args, Box::new(closure), Box::new(ret), Box::new(fx_type))
}