[m-dev.] proposals for improving the situation wrt Mantis bug #585

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Sep 23 23:15:16 AEST 2026



On Wed, 23 Sep 2026 11:55:12 +1000, Peter Wang <novalazy at gmail.com> wrote:
> > to ensure that the branched control structure defines a typeclass info
> > for the constraint regardless of which branch is executed,
> > 
> > - either copy the code to construct that typeclass info variable from its
> >   "home" branch to all the other branches that (in their original form)
> >   do not define such a typeclass info (if there are any), or
> > 
> > - delete that code from all the branches that have it, and put just one copy
> >   to just before the start of the branched control structure. It does not
> >   matter which, since they are isomorphic, and by assumption, the inputs
> >   to the computation of typeclass into construction process are all either
> >   constants, or variables that were already ground at that program point.
> > 
> > The latter is probably preferable in terms of code size, though it may
> > increase stack slot pressure.
> > 
> 
> The latter sounds preferable.

Agreed.

> The proposal seems good to me.

Thanks for the review.

Zoltan.





More information about the developers mailing list