I found this video very helpful, since I was indeed confused about the two meanings of impredicativity that I had seen floating around. One used by haskellers, which was that you can't instantiate a type variable a with a ( forall t). Impredicative in Coq means having (Type : Type).

forall p. [p] -> [p] -- LEGALInt -> (forall p. [p] -> [p])  -- ILLEGAL(forall p. [p] -> [p])  -> Int -- ILLEGAL[forall a. a -> a] -- ILLEGAL
Int -> (forall p. [p] -> [p])  -- LEGAL(forall p. [p] -> [p])  -> Int -- LEGALrunST :: (forall s. ST s a) -> a -- LEGAL[forall a. a -> a] -- ILLEGAL
[forall a. a -> a]
($) :: forall a, forall b, (a -> b) -> a -> brunST :: forall a, (forall s, ST s a) -> a -- LEGALst :: forall s. ST s IntrunST st -- YESrunST $ st -- NO
($) runST st($) @ (forall s. ST s Int) @Int  (runST @ Int) st

§ How does ordinary type inference work?

reverse ::a. [a] -> [a]and :: [Bool] -> Boolfoo = \xs -> (reverse xs, and xs)

§ Where does this fail for polytypes?

§ But it looks so easy!

§ New plan

§ The big picture

Replace the idea of:

§ What can QuickLook learn?