@@ -99,14 +99,14 @@ getModuleEdit recorder env cabalFilePath stanza targetFieldStr modulePath =
99
99
cabalFilePath
100
100
mkConfig
101
101
where
102
- mkConfig :: (ByteString -> [Field Position ] -> GenericPackageDescription -> ExceptT PluginError m Config )
102
+ mkConfig :: (ByteString -> [Field Position ] -> GenericPackageDescription -> ExceptT PluginError m AddConfig )
103
103
mkConfig cnfOrigContents fields packDescr = do
104
104
let compName =
105
105
case Add. resolveComponent cabalFilePath (fields, packDescr) $ Just $ CabalPretty. prettyShow stanza of
106
106
Right x -> x
107
107
Left _ -> error " "
108
108
pure $
109
- Config
109
+ AddConfig
110
110
{ cnfOrigContents = cnfOrigContents
111
111
, cnfFields = fields
112
112
, cnfComponent = compName
@@ -149,7 +149,7 @@ getDependencyEdit ::
149
149
getDependencyEdit recorder env cabalFilePath buildTarget dependency =
150
150
mkCabalAddConfig recorder env cabalFilePath mkConfig
151
151
where
152
- mkConfig :: (ByteString -> [Field Position ] -> GenericPackageDescription -> ExceptT PluginError m Config )
152
+ mkConfig :: (ByteString -> [Field Position ] -> GenericPackageDescription -> ExceptT PluginError m AddConfig )
153
153
mkConfig cnfOrigContents fields packDescr = do
154
154
let specVer = specVersion $ packageDescription packDescr
155
155
(deps, compName) <-
@@ -158,7 +158,7 @@ getDependencyEdit recorder env cabalFilePath buildTarget dependency =
158
158
compName <- resolveComponent cabalFilePath (fields, packDescr) buildTarget
159
159
pure (deps, compName)
160
160
pure $
161
- Config
161
+ AddConfig
162
162
{ cnfOrigContents = cnfOrigContents
163
163
, cnfFields = fields
164
164
, cnfComponent = compName
@@ -180,7 +180,7 @@ mkCabalAddConfig ::
180
180
( ByteString ->
181
181
[Field Position ] ->
182
182
GenericPackageDescription ->
183
- ExceptT PluginError m Config
183
+ ExceptT PluginError m AddConfig
184
184
) ->
185
185
ExceptT PluginError m WorkspaceEdit
186
186
mkCabalAddConfig recorder env cabalFilePath mkConfig = do
@@ -211,7 +211,7 @@ mkCabalAddConfig recorder env cabalFilePath mkConfig = do
211
211
212
212
cabalAddConfig <- mkConfig cnfOrigContents fields packDescr
213
213
214
- case executeConfig (validateChanges packDescr) cabalAddConfig of
214
+ case executeAddConfig (validateChanges packDescr) cabalAddConfig of
215
215
Nothing ->
216
216
throwE $
217
217
PluginInternalError $
0 commit comments