<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_default" style="font-family:tahoma,sans-serif">
Do we have an existing way of substituting types over type variables, *in <br>
HsType instead of Core Type*?

</div></blockquote><div><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">I'm afraid not. Currently HsType is not processed much -- just renamed and typechecked into a Type.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">The nearest we have is Note [Handling overloaded and rebindable constructs], in the renamer.  That doesn't do what you want, but the HsExpansion idea is close</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">S</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 25 Jul 2022 at 10:18, ÉRDI Gergő <<a href="mailto:gergo@erdi.hu">gergo@erdi.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 22 Jul 2022, Simon Peyton Jones wrote:<br>
<br>
>       So it seems that instead of shoehorning it into the existing type<br>
>       synonyms, a better bet would be to branch off to a separate path quite<br>
>       early (maybe as soon as during renaming), expand them during<br>
>       typechecking, and *not* touch how/when existing "normal" type synonyms<br>
>       are resolved.<br>
> <br>
> <br>
> That sounds plausible, yes.<br>
<br>
Do we have an existing way of substituting types over type variables, *in <br>
HsType instead of Core Type*?<br>
</blockquote></div>