File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
plugins/hls-change-type-signature-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
{-# LANGUAGE LambdaCase #-}
2
3
{-# LANGUAGE ViewPatterns #-}
3
4
-- | An HLS plugin to provide code actions to change type signatures
@@ -169,7 +170,11 @@ findSolverReport (TcRnMessageWithInfo _ (TcRnMessageDetailed errInfo msg)) =
169
170
case findSolverReport msg of
170
171
Just (mismatch, _) -> Just (mismatch, Just errInfo)
171
172
_ -> Nothing
173
+ #if MIN_VERSION_ghc(9,10,0)
174
+ findSolverReport (TcRnSolverReport (SolverReportWithCtxt _ mismatch) _) =
175
+ #else
172
176
findSolverReport (TcRnSolverReport (SolverReportWithCtxt _ mismatch) _ _) =
177
+ #endif
173
178
Just (mismatch, Nothing )
174
179
findSolverReport _ = Nothing
175
180
@@ -181,7 +186,11 @@ findMismatchMessage _ = Nothing
181
186
182
187
-- TODO: Make this a prism?
183
188
findTypeEqMismatch :: MismatchMsg -> Maybe (Type , Type )
189
+ #if MIN_VERSION_ghc(9,12,0)
190
+ findTypeEqMismatch (TypeEqMismatch _ _ _ expected actual _ _) =
191
+ #else
184
192
findTypeEqMismatch (TypeEqMismatch _ _ _ _ expected actual _ _) =
193
+ #endif
185
194
Just (expected, actual)
186
195
findTypeEqMismatch _ = Nothing
187
196
You can’t perform that action at this time.
0 commit comments