@@ -81,12 +81,19 @@ stackBenchmarkFiles ::
81
81
stackBenchmarkFiles bench =
82
82
resolveComponentFiles (CBench bench. name) build names
83
83
where
84
+ names :: [DotCabalDescriptor ]
84
85
names = bnames <> exposed
86
+
87
+ exposed :: [DotCabalDescriptor ]
85
88
exposed =
86
89
case bench. interface of
87
90
BenchmarkExeV10 _ fp -> [DotCabalMain fp]
88
91
BenchmarkUnsupported _ -> []
92
+
93
+ bnames :: [DotCabalDescriptor ]
89
94
bnames = map DotCabalModule build. otherModules
95
+
96
+ build :: StackBuildInfo
90
97
build = bench. buildInfo
91
98
92
99
-- | Get all files referenced by the test.
@@ -96,13 +103,20 @@ stackTestSuiteFiles ::
96
103
stackTestSuiteFiles test =
97
104
resolveComponentFiles (CTest test. name) build names
98
105
where
106
+ names :: [DotCabalDescriptor ]
99
107
names = bnames <> exposed
108
+
109
+ exposed :: [DotCabalDescriptor ]
100
110
exposed =
101
111
case test. interface of
102
112
TestSuiteExeV10 _ fp -> [DotCabalMain fp]
103
113
TestSuiteLibV09 _ mn -> [DotCabalModule mn]
104
114
TestSuiteUnsupported _ -> []
115
+
116
+ bnames :: [DotCabalDescriptor ]
105
117
bnames = map DotCabalModule build. otherModules
118
+
119
+ build :: StackBuildInfo
106
120
build = test. buildInfo
107
121
108
122
-- | Get all files referenced by the executable.
@@ -112,7 +126,10 @@ stackExecutableFiles ::
112
126
stackExecutableFiles exe =
113
127
resolveComponentFiles (CExe exe. name) build names
114
128
where
129
+ build :: StackBuildInfo
115
130
build = exe. buildInfo
131
+
132
+ names :: [DotCabalDescriptor ]
116
133
names =
117
134
map DotCabalModule build. otherModules ++ [DotCabalMain exe. modulePath]
118
135
@@ -124,13 +141,24 @@ stackLibraryFiles ::
124
141
stackLibraryFiles lib =
125
142
resolveComponentFiles componentName build names
126
143
where
144
+ componentRawName :: StackUnqualCompName
127
145
componentRawName = lib. name
146
+
147
+ componentName :: NamedComponent
128
148
componentName
129
149
| componentRawName == emptyCompName = CLib
130
150
| otherwise = CSubLib componentRawName
151
+
152
+ build :: StackBuildInfo
131
153
build = lib. buildInfo
154
+
155
+ names :: [DotCabalDescriptor ]
132
156
names = bnames ++ exposed
157
+
158
+ exposed :: [DotCabalDescriptor ]
133
159
exposed = map DotCabalModule lib. exposedModules
160
+
161
+ bnames :: [DotCabalDescriptor ]
134
162
bnames = map DotCabalModule build. otherModules
135
163
136
164
-- | Get all files referenced by the component.
@@ -154,6 +182,7 @@ resolveComponentFiles component build names = do
154
182
cfiles <- buildOtherSources build
155
183
pure (component, ComponentFile modules (files <> cfiles) warnings)
156
184
where
185
+ autogenDirs :: RIO GetPackageFileContext [Path Abs Dir ]
157
186
autogenDirs = do
158
187
distDir <- asks (. distDir)
159
188
let compDir = componentAutogenDir component distDir
0 commit comments