On Wed, Sep 16, 2009 at 11:58 AM, Cristiano Paris <frodo@theshire.org> wrote:
On Wed, Sep 16, 2009 at 7:12 PM, Ryan Ingram <ryani.spam@gmail.com> wrote:I can easily understand your explanation for test2: the type var a is
> Here's the difference between these two types:
>
> test1 :: forall a. a -> Int
> -- The caller of test1 determines the type for test1
> test2 :: (forall a. a) -> Int
> -- The internals of test2 determines what type, or types, to instantiate the
> argument at
closed under existential (?) quantification. I can't do the same for
test1, even if it seems that a is closed under universal (?)
quantification as well.
> Or, to put it another way, since there are no non-bottom objects of typeWhy?
> (forall a. a):
> test1 converts *anything* to an Int.Is the only possible implementation of test1 the one ignoring its
argument (apart from bottom of course)?