Skip to content

Commit efad46c

Browse files
committed
attempt fixing exactprint <9.10
1 parent 8267cad commit efad46c

File tree

1 file changed

+1
-11
lines changed
  • plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction

1 file changed

+1
-11
lines changed

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/Args.hs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,7 @@ toCodeAction3 get f = ExceptT . ReaderT $ \caa -> get caa >>= flip runReaderT ca
213213

214214
-- | this instance returns a delta AST, useful for exactprint transforms
215215
instance ToCodeAction r => ToCodeAction (ParsedSource -> r) where
216-
#if !MIN_VERSION_ghc(9,3,0)
217-
toCodeAction f = ExceptT . ReaderT $ \caa@CodeActionArgs {caaAnnSource = x} ->
218-
x >>= \case
219-
Just s -> flip runReaderT caa . runExceptT . toCodeAction $ f s
220-
_ -> pure $ Right []
221-
#else
222-
toCodeAction f = ExceptT . ReaderT $ \caa@CodeActionArgs {caaParsedModule = x} ->
223-
x >>= \case
224-
Just s -> flip runReaderT caa . runExceptT . toCodeAction . f . pm_parsed_source $ s
225-
_ -> pure $ Right []
226-
#endif
216+
toCodeAction = toCodeAction2 caaAnnSource
227217

228218
instance ToCodeAction r => ToCodeAction (ExportsMap -> r) where
229219
toCodeAction = toCodeAction3 caaExportsMap

0 commit comments

Comments
 (0)