You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that given the binary format today there's not actually any means by which a core module type could be exported. I think this is because type exports always look up in the component type index space.
That being said I also am not sure why one would need to do this, so I mostly wanted to open this up as a possible "hole" in the binary encoding so we could explicitly decide one way or another.
Ah right, good point. I think this could be backwards-compatibly added by adding a third case to typebound, perhaps written (core eq <core:typeidx>). Does that sound right?
And just to confirm: this limitation applies to imports as well, yes?
Because core types are pure and thus don't break shared-nothing, it seems fine to add this. That being said, I'm having a hard time imagining a use case, so I'd be happy to wait for a while and file this under "things to fill in before 1.0", unless someone would like to do otherwise.
Activity
lukewagner commentedon Oct 30, 2023
Ah right, good point. I think this could be backwards-compatibly added by adding a third case to
typebound, perhaps written(core eq <core:typeidx>). Does that sound right?And just to confirm: this limitation applies to imports as well, yes?
Because core types are pure and thus don't break shared-nothing, it seems fine to add this. That being said, I'm having a hard time imagining a use case, so I'd be happy to wait for a while and file this under "things to fill in before 1.0", unless someone would like to do otherwise.
alexcrichton commentedon Oct 30, 2023
That all sounds reasonable to me yeah, and would agree it's ok to defer