# HG changeset patch # User Simon Heath # Date 1752179902 14400 # Thu Jul 10 16:38:22 2025 -0400 # Branch devel # Node ID ea2085a917eda5370322e2afd8b904a81c54e358 # Parent 2b3d5c7059c86ea02f7e6a64d9feae7f426fc89a Slowly unhecking forall's in typedefs. Think we're gonna need to handle enum and sum types specially there, too diff --git a/src/hir2/lower.rs b/src/hir2/lower.rs --- a/src/hir2/lower.rs +++ b/src/hir2/lower.rs @@ -486,23 +486,12 @@ name, typedecl, doc_comment: _, - params, + params: _, } => { - // lower_typedef(accm, *name, typedecl, params); - - // if our type decl has type params, we slap a forall - // around the body type. - // - // This gets us a forall type at the top level, which feels - // a little insane, but it has to be instantiated with a type - // constructor to be used sooooooo... - // I guess it's no different from functions with generic params. - let typedecl = if params.is_empty() { - lower_type(typedecl) - } else { - let args: Vec<_> = params.iter().map(|nm| (*nm, Kind::KType)).collect(); - TypeNode::forall(&args, &lower_type(typedecl)) - }; + // TODO: Do something with params to check 'em, 'cause + // lower_type() handles forall-conversion correctly already. + // Maybe we can get rid of 'em entirely? + let typedecl = lower_type(typedecl); let decl = TypeDef { name: *name, typedecl,