hpack
hpack copied to clipboard
add an `exclude` or `blacklis` class of modules
The automatism for computing the list of modules to include is nice and works most of the time, but there are numerous cases where a source file in a source directory should not be included (i.e. excluded or blacklisted). There were several questions to this effect in the issue tracker and there is a standard workaround (which each new user has to find..). The workaround is neither obvious nor without its own problems.
I suggest that you add a keyword blacklist which accepts a list or a dictionary of module names not to include in the modules list (neither the exposed nor the other-modules list).
I think this is a conservative extension which could not break any existing code (the workaround will still work) and I do not see any interactions with other parts of hpack (but I admit that I have not considered every mechanism).
Thank you for hpack - it makes writing and managing haskell code much more productive!
Are you talking about this? https://github.com/sol/hpack/issues/303#issuecomment-700905674
If so, the workaround is mentioned prominently in the README as of #404: https://github.com/sol/hpack/blob/f1aa0c48eb696d66be8c1bcf68528253eab09178/README.md#handling-of-paths_-modules
That being said, it might be nice to have it as a first class feature.
I use the workaround mentioned in #404 - but felt a cleaner solution would be desirable. Thank you for considering!