Wildcards in type synonyms

Simon Peyton Jones simon.peytonjones at gmail.com
Mon Jul 25 09:25:34 UTC 2022


>
> Do we have an existing way of substituting types over type variables, *in
> HsType instead of Core Type*?
>

I'm afraid not. Currently HsType is not processed much -- just renamed and
typechecked into a Type.

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

S

On Mon, 25 Jul 2022 at 10:18, ÉRDI Gergő <gergo at erdi.hu> wrote:

> On Fri, 22 Jul 2022, Simon Peyton Jones wrote:
>
> >       So it seems that instead of shoehorning it into the existing type
> >       synonyms, a better bet would be to branch off to a separate path
> quite
> >       early (maybe as soon as during renaming), expand them during
> >       typechecking, and *not* touch how/when existing "normal" type
> synonyms
> >       are resolved.
> >
> >
> > That sounds plausible, yes.
>
> Do we have an existing way of substituting types over type variables, *in
> HsType instead of Core Type*?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220725/c9f0d034/attachment.html>


More information about the ghc-devs mailing list