[Haskell-cafe] Impredicativity confusion

Gleb Alexeyev gleb.alexeev at gmail.com
Wed Aug 22 09:48:29 EDT 2007


Hello Cafe!

Is there some reason why definition of 'boom' in the code below won't 
compile? Is it documented somewhere? Thanks.

{-# OPTIONS_GHC -fglasgow-exts #-}

data Foo a

foo :: Foo a -> a -> Bool
foo = undefined

newtype A = A (forall a. a->a)

ok = foo f (A id)
     where f = undefined :: Foo A

type B = forall a. a->a

boom = foo f (id :: B)
     where f = undefined :: Foo B



More information about the Haskell-Cafe mailing list