[Haskell-cafe] How to understand the 'forall' ?

Cristiano Paris frodo at theshire.org
Wed Sep 16 04:04:48 EDT 2009


On Tue, Sep 15, 2009 at 11:38 PM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
> ...
>> foo :: forall a. a -> a
>
> This is exactly the same type as
>
> foo :: a -> a
>
> (unless you're using ScopedTypeVariables and there's a type variable a in scope), since
> type signatures are implicitly forall'd.

Yep, perhaps I used the wrong example. What about foo: (forall a. a) -> Int?

Cristiano


More information about the Haskell-Cafe mailing list