Yes but as I understood it the type inferer was taking your type annotation for granted, and apparently in fact it re-specifies it.
What you said was in reality:
> f :: forall. a -> a
> f x = undefined :: forall a1. a1
And it turned it into:
f :: forall. a -> a
f x = undefined :: a
(here, 'a' would be scoped)
There's something I don't get...
On Wed, Jan 4, 2012 at 9:41 PM, Yves Parès <limestrael@gmail.com> wrote:It works.
> Would you try:
>
> f :: a -> a
> f x = undefined :: a
>
> And tell me if it works? IMO it doesn't.
As I understand, in this situation we are specializing the 'undefined
:: forall a. a'
to a more specific dependent type.