[Haskell-cafe] What does the `forall` mean ?
leather at cs.uu.nl
Thu Nov 12 17:59:50 EST 2009
> 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.
Those are different functions all together, so perhaps you meant these.
foo :: forall x y. (x -> x) -> y
bar :: forall y. (forall x . x -> x) -> y
While neither function is seemingly useful, the second says that the
higher-order argument must be polymorphic. I see two options:
The first has these and many more:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe