Fix effect module

This commit is contained in:
Ayaz Hafiz 2022-04-24 14:47:07 -04:00
parent e543dd4fe6
commit 23bbe0863b
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 56 additions and 45 deletions

View file

@ -8,8 +8,8 @@ use crate::pattern::Pattern;
use crate::scope::Scope;
use bumpalo::Bump;
use roc_collections::{MutMap, SendMap, VecSet};
use roc_module::ident::Ident;
use roc_module::ident::Lowercase;
use roc_module::ident::{Ident, TagName};
use roc_module::symbol::{IdentIds, ModuleId, ModuleIds, Symbol};
use roc_parse::ast;
use roc_parse::header::HeaderFor;
@ -116,13 +116,11 @@ impl GeneratedInfo {
)
.unwrap();
let effect_tag_name = TagName::Private(effect_symbol);
{
let a_var = var_store.fresh();
let actual = crate::effect_module::build_effect_actual(
effect_tag_name,
effect_symbol,
Type::Variable(a_var),
var_store,
);
@ -132,7 +130,7 @@ impl GeneratedInfo {
Region::zero(),
vec![Loc::at_zero(("a".into(), a_var))],
actual,
AliasKind::Structural,
AliasKind::Opaque,
);
}
@ -433,7 +431,7 @@ pub fn canonicalize_module_defs<'a>(
&mut scope,
*symbol,
&ident,
TagName::Private(effect_symbol),
effect_symbol,
var_store,
annotation,
);