According to this link describing existential types:
A value of an existential type like ∃x. F(x) is a pair containing some type x and a value of the type F(x). Whereas a value of a polymorphic type like ∀x. F(x) is a function that takes some type x and produces a value of type F(x). In both cases, the type closes over some type constructor F.
But a function definition with type class constraints doesn't pair with the type class instance.
It's not forall f, exists Functor f, ... (because it's obvious not every type f has instance of Functor f, hence exists Functor f ... not true).
It's not exists f and Functor f, ... (because it's applicable to all instances of satisfied f, not only the chosen one).
To me, it's forall f and instances of Functor f, ..., more like to scala's implicit arguments rather than existential types.
And according to this link describing type classes:
[The class declaration for
Eq] means, logically, there is a type a for which the typea -> a -> Boolis inhabited, or, from a it can be proved thata -> a -> Bool(the class promises two different proofs for this, having names==and/=). This proposition is of existential nature (not to be confused with existential type)
What's the difference between type classes and existential types, and why are they both considered "existential"?
Eq Ameans "there exists a function(==) :: A -> A -> Bool" - luquiforall a.whenEq a, then this function exists foraand has typea -> a". - Cubicclass C a where ...does not imply that there is a typeafor which we can instantiate the class, inhabiting the methods. It is using the word "existential" quite liberally. It is similar to saying thatf :: (Int -> Bool) -> Charassumes that "it exists some functionInt->Bool" before generating aChar. I would ignore that sentence. - chi