Use of forall as a sigil

Richard Eisenberg rae at richarde.dev
Mon Nov 23 03:24:21 UTC 2020


For me, the problem with `forall @a .` is that it seems to go in the wrong direction: parameters declared with @ must not have @ when passed, and parameters declared without @ must have a @ if the parameter is passed explicitly.

However, if we say that @ makes a thing that is normally implicit explicit, maybe it works?

Richard

> On Nov 22, 2020, at 3:03 PM, Andrey Mokhov <andrey.mokhov at newcastle.ac.uk> wrote:
> 
> Hi John,
> 
>> - We are already getting `forall {a}.`, so it fits nicely with that.
> 
> Interesting, I wasn't aware of this. Could you point me to the relevant proposal?
> 
>> - However, it would have to be `forall @a ->`, 
> 
> Oh, that seems even worse than `forall a ->` to me.
> 
>> because `forall a.` is already an invisible quantification,
>> unless one wants to just change the meaning of `forall a.`!
> 
> I'm confused. I wasn't suggesting to change the meaning of `forall a.`.
> 
> My suggestion was pretty incremental:
> 
> * `forall a.` stays as is: it allows for both invisible and visible type arguments.
> * `forall @a.` requires a visible type argument.
> 
> Cheers,
> Andrey
> 
> -----Original Message-----
> From: John Ericson [mailto:john.ericson at obsidian.systems] 
> Sent: 22 November 2020 16:41
> To: Andrey Mokhov <andrey.mokhov at newcastle.ac.uk>; Richard Eisenberg <rae at richarde.dev>
> Cc: ghc-devs at haskell.org
> Subject: Re: Use of forall as a sigil
> 
> 
> I have thought about this too, and don't believe it has been widely
> discussed.
> 
> - We are already getting `forall {a}.`, so it fits nicely with that.
> 
> - However, it would have to be `forall @a ->`, because `forall a.` is
> already an invisible quantification, unless one wants to just change the
> meaning of `forall a.`!
> 
> John
> 



More information about the ghc-devs mailing list