Use of forall as a sigil

Richard Eisenberg rae at richarde.dev
Thu Dec 3 15:56:57 UTC 2020



> On Dec 3, 2020, at 10:23 AM, Bryan Richter <b at chreekat.net> wrote:
> 
> Consider `forall a -> a -> a`. There's still an implicit universal quantification that is assumed, right?

No, there isn't, and I think this is the central point of confusion. A function of type `forall a -> a -> a` does work for all types `a`. So I think the keyword is appropriate. The only difference is that we must state what `a` is explicitly. I thus respectfully disagree with

> But somewhere, an author decided to reuse the same keyword to herald a type argument. It seems they stopped thinking about the meaning of the word itself, saw that it was syntactically in the right spot, and borrowed it to mean something else.

Does this help clarify? And if it does, is there a place you can direct us to where the point could be made more clearly? I think you're far from the only one who has tripped here.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20201203/788a401b/attachment.html>


More information about the ghc-devs mailing list