You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
register_type_decl's TyEnum branch built result_ty tyvars with an
anonymous fresh_tyvar 0 and never bound the declared param names, so
(a) field types and the result type used disconnected vars and
(b) generalize was a no-op at level 0 -> imported parametric ctor
schemes (prelude Ok/Err/Some) were monomorphic with shared vars,
collapsing payload types across use-sites on the import path.
Bind param names to fresh tyvars one level deeper so result and field
types share them, generalize at the outer level, and scope the param
names so they don't leak into sibling type decls.
Fixes stdlib/result.affine; stdlib 14->15/19; 233/233 dune test, zero regression.
Refs #128
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments