Maybe we could use a C cast–like syntax to specify which module we want to look up a declaration from?
let elementA = array.(ModuleA)element(at: 0)
let elementB = array.(ModuleB)element(at: 0)
This would also solve the problem where there is no way to fully qualify a declaration if there is a type in scope with the same name as its module, since declarations would be fully qualifiable like this: (WidgetKit)Widget
.