I’m currently doing what kotlinz does (which I think borrowed the idea from swiftz), which use a combination of kind interfaces to “flatten" generics and inner classes as self types (so you can pass them as type arguments to an interface representing a higher kinded type)