I wrote some comptime functions that check to see if one type is supertype of another where supertype is deifned as having all pub decls and fields of another but not just limited to those. I can then write an interface struct (yeah each function needs a body still but I make it just a simple return of whatever – it never gets run just needs to be there syntactically) and reference it in the documentation so show what fn signatures, decls, and fields need to be implemented. And the first line of the any function taking an anytype can do a full typechecl.
The hashmap has this very very long hand written highly specific verifyContext function. I’m not sure why that wasn’t just written generically and added to meta. Everybody with their own bespoke implementations is really bad for the langauge.
I added a const __implOf: type = InterfaceType so the interface checker can recursive check all types in consistent with their interfaces. There is a problem right now with mutually recursive types, and either use the void trick or just make comptime array of all the types I’ve seen and just keep adding to that and looking them up or some other way to stop the recursion. (I use __ as a prefix to items that signaling or autogenerated).