In particular, how to deal with version bounds. When I have N public sublibraries and N executables, it seems like I have to repeat many of the bounds to make cabal check happy.
Otherwise, it is a great feature, and I am happy not to compile pandoc if the given library/executable does not need it.
If you are importing a sublibrary into your main — or other — library, bounds specifications should be inherited. Example: specifying bounds on megaparsec in swarm-lang will make warnings go away from swarm-lang, but also from swarm-tournament, etc.
I would probably use common stanzas. (It would be nice to have some kind of VSCode lens for displaying the “expanded” form of a library, with the common stanzas resolved.)
It’s interesting that all the libraries provided by swarm are public sub-libraries and, as such, no Haddocks are generated for them. Is there some Haddock issue for multiple sub-library support? I couldn’t find it.
You can already generate haddocks for a sublibrary with cabal haddock lib:sublib. Presumably the --(use|gen)-(contents|index) options can be used to merge these haddocks and the results manually uploaded to hackage, though it’s a shame this isn’t automated.