Allow named defaults for poly-kinded (unary) classes
Ticket: #25882 (closed)
With this MR, we now accept named default declarations for poly-kinded classes such as Typeable
, e.g.
default Typeable (Char)
This used to fail because we assumed the kind of the class was monomorphic, e.g.
Type -> Constraint
(Type -> Type) -> Constraint
Nat -> Constraint
Now, we can handle a simple polymorphic class such as Typeable :: forall k. k -> Constraint
.
Note that we keep the restriction that the class must only have one visible argument.
Edited by sheaf