Why class constraint in type synonym needs RankNTypes
问题 This compiles fine: type List a = [a] But when I introduce a class constraint, the compiler asks for RankNTypes to be included: type List2 a = Num a => [a] After including that extension, it compiles fine. Why is that extension required for compiling the code ? Edit: Why do I need the constraint in the first place ? I was inspecting this Lens type ( type RefF a b = Functor f => (b -> f b) -> (a -> f a) ) from this post and found out that it actually needed RankNTypes because of the Functor