@@ -81,12 +81,19 @@ stackBenchmarkFiles ::
8181stackBenchmarkFiles bench =
8282 resolveComponentFiles (CBench bench. name) build names
8383 where
84+ names :: [DotCabalDescriptor ]
8485 names = bnames <> exposed
86+
87+ exposed :: [DotCabalDescriptor ]
8588 exposed =
8689 case bench. interface of
8790 BenchmarkExeV10 _ fp -> [DotCabalMain fp]
8891 BenchmarkUnsupported _ -> []
92+
93+ bnames :: [DotCabalDescriptor ]
8994 bnames = map DotCabalModule build. otherModules
95+
96+ build :: StackBuildInfo
9097 build = bench. buildInfo
9198
9299-- | Get all files referenced by the test.
@@ -96,13 +103,20 @@ stackTestSuiteFiles ::
96103stackTestSuiteFiles test =
97104 resolveComponentFiles (CTest test. name) build names
98105 where
106+ names :: [DotCabalDescriptor ]
99107 names = bnames <> exposed
108+
109+ exposed :: [DotCabalDescriptor ]
100110 exposed =
101111 case test. interface of
102112 TestSuiteExeV10 _ fp -> [DotCabalMain fp]
103113 TestSuiteLibV09 _ mn -> [DotCabalModule mn]
104114 TestSuiteUnsupported _ -> []
115+
116+ bnames :: [DotCabalDescriptor ]
105117 bnames = map DotCabalModule build. otherModules
118+
119+ build :: StackBuildInfo
106120 build = test. buildInfo
107121
108122-- | Get all files referenced by the executable.
@@ -112,7 +126,10 @@ stackExecutableFiles ::
112126stackExecutableFiles exe =
113127 resolveComponentFiles (CExe exe. name) build names
114128 where
129+ build :: StackBuildInfo
115130 build = exe. buildInfo
131+
132+ names :: [DotCabalDescriptor ]
116133 names =
117134 map DotCabalModule build. otherModules ++ [DotCabalMain exe. modulePath]
118135
@@ -124,13 +141,24 @@ stackLibraryFiles ::
124141stackLibraryFiles lib =
125142 resolveComponentFiles componentName build names
126143 where
144+ componentRawName :: StackUnqualCompName
127145 componentRawName = lib. name
146+
147+ componentName :: NamedComponent
128148 componentName
129149 | componentRawName == emptyCompName = CLib
130150 | otherwise = CSubLib componentRawName
151+
152+ build :: StackBuildInfo
131153 build = lib. buildInfo
154+
155+ names :: [DotCabalDescriptor ]
132156 names = bnames ++ exposed
157+
158+ exposed :: [DotCabalDescriptor ]
133159 exposed = map DotCabalModule lib. exposedModules
160+
161+ bnames :: [DotCabalDescriptor ]
134162 bnames = map DotCabalModule build. otherModules
135163
136164-- | Get all files referenced by the component.
@@ -154,6 +182,7 @@ resolveComponentFiles component build names = do
154182 cfiles <- buildOtherSources build
155183 pure (component, ComponentFile modules (files <> cfiles) warnings)
156184 where
185+ autogenDirs :: RIO GetPackageFileContext [Path Abs Dir ]
157186 autogenDirs = do
158187 distDir <- asks (. distDir)
159188 let compDir = componentAutogenDir component distDir
0 commit comments