As I found out in my PR, Stack.Constants doesn't only contain constants but also contains a bunch of helper functions for which it imports Stack.Types.Compiler, Stack.Types.Config, Stack.Types.PackageIdentifier and Stack.Types.PackageName. The problem is that these modules cannot in turn use any of the "actual" constants in Stack.Constants.
I propose that Stack.Constants become a "top-level" module that doesn't import any of the Stack.* modules, and that all the exports from Stack.Constants that depend on other Stack.* modules be moved elsewhere.
A few can even be deleted as they aren't used anywhere:
builtConfigFileFromDir
builtFileFromDir
configuredFileFromDir
defaultShakeThreads
userDocsDir
testBuiltFile
benchBuiltFile
For those "non-constant" exports that are currently used in only a single module, I'd propose that they could simply be moved inside that module.
After that there still remain the following "non-constant" functions that are used in more than one module:
distDirFromDir
distRelativeDir
hpcRelativeDir
Any ideas for those?
As I found out in my PR,
Stack.Constantsdoesn't only contain constants but also contains a bunch of helper functions for which it importsStack.Types.Compiler,Stack.Types.Config,Stack.Types.PackageIdentifierandStack.Types.PackageName. The problem is that these modules cannot in turn use any of the "actual" constants inStack.Constants.I propose that
Stack.Constantsbecome a "top-level" module that doesn't import any of theStack.*modules, and that all the exports fromStack.Constantsthat depend on otherStack.*modules be moved elsewhere.A few can even be deleted as they aren't used anywhere:
For those "non-constant" exports that are currently used in only a single module, I'd propose that they could simply be moved inside that module.
After that there still remain the following "non-constant" functions that are used in more than one module:
Any ideas for those?