[Haskell-cafe] What does the `forall` mean ?
Andrew Coppin
andrewcoppin at btinternet.com
Thu Nov 12 15:51:22 EST 2009
David Virebayre wrote:
> On Thu, Nov 12, 2009 at 8:52 PM, Andrew Coppin
> <andrewcoppin at btinternet.com> wrote:
>
>
>> I just meant it's not immediately clear how
>>
>
>
>> foo :: forall x. (x -> x -> y)
>>
>
>
>> is different from
>>
>
>
>> foo :: (forall x. x -> x) -> y
>>
>
>
>> It takes a bit of getting used to.
>>
>
> That still confuses me.
>
The difference is when the x variable gets bound - but to comprehend
that, you have to realise that x gets bound at some point, which is
non-obvious...
More information about the Haskell-Cafe
mailing list