
4 Jan
2012
4 Jan
'12
8:50 a.m.
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...
2012/1/4 Yucheng Zhang
On Wed, Jan 4, 2012 at 9:41 PM, Yves Parès
wrote: Would you try:
f :: a -> a f x = undefined :: a
And tell me if it works? IMO it doesn't.
It works.
As I understand, in this situation we are specializing the 'undefined :: forall a. a' to a more specific dependent type.