wybe
wybe copied to clipboard
Inside a submodule, there should be a nickname for ancestor types
In a type module, you can specify the current type as _, but in a submodule, you can't use that nickname, as _ specifies the submodule name. So if you want to use the parent type name inside a submodule, you have to spell it out.
Something like _._ should refer to the parent. This generalised to grandparents _._._, etc.
It could also be used to refer to a sibling module, too, with _._.foo being the parent's foo module.
Nice, that seems pretty intuitive. Let's go with that.