Closed ta0kira closed 4 years ago
Three options:
Do this on a per-.0rp
basis in .zeolite-module
. This should be straightforward.
Do this on a per-category basis. This would require somehow marking a category is private in the type map so that lookup fails. This would likely need to be done with a comparison between the public namespace of the module being compiled vs. that of the module owning the category.
.zeolite-module
adds hidden behavior that would still require a comment next to the category in the .0rp
.Just require that anything private live in a subdirectory that's listed as a private dep. The only real drawback here is that it would be difficult to make a private+public pair of categories depend on each other internally.
Overall, I like the 3rd option because it's no work for me, and it's also more clear to the user because the private files are in a different directory.
Actually, I think option 1 is better, so that breaking up monolithic .0rx
sources doesn't require creating a subdirectory.
Rather than putting this in .zeolite-module
, it could just be some sort of pragma. This obviously requires coming up with reasonable syntax and semantics for pragmas in general, as well as error/warning behavior.
All categories in
.0rp
source files are visible outside of the module. There should be a way to mark certain categories as private to the module, probably in.zeolite-module
.