Use of forall as a sigil

Andrey Mokhov andrey.mokhov at
Sun Nov 22 11:23:05 UTC 2020

Hi Richard,

> In the end, I've never loved the forall ... -> syntax, but I've never seen
> anything better.

What about the forall @a. syntax?

For example:

  sizeOf :: forall @a. Sized a => Int

We already use @ to explicitly specify types, so it seems natural mark type parameters that must be explicitly specified with @ too.

Here's how one would read it: "for all explicitly specified a, ..."

Apologies if this has been discussed and I missed it. It doesn't seem to be mentioned in the Alternatives section of the proposal but perhaps it will just never work for some reason.


More information about the ghc-devs mailing list