From efad46c20e8a4d8cd97ef16f22b264d1d1eb03e7 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Wed, 12 Jun 2024 09:39:30 +0200 Subject: [PATCH] attempt fixing exactprint <9.10 --- .../src/Development/IDE/Plugin/CodeAction/Args.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/Args.hs b/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/Args.hs index cd1e301acc..0be04656bd 100644 --- a/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/Args.hs +++ b/plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/Args.hs @@ -213,17 +213,7 @@ toCodeAction3 get f = ExceptT . ReaderT $ \caa -> get caa >>= flip runReaderT ca -- | this instance returns a delta AST, useful for exactprint transforms instance ToCodeAction r => ToCodeAction (ParsedSource -> r) where -#if !MIN_VERSION_ghc(9,3,0) - toCodeAction f = ExceptT . ReaderT $ \caa@CodeActionArgs {caaAnnSource = x} -> - x >>= \case - Just s -> flip runReaderT caa . runExceptT . toCodeAction $ f s - _ -> pure $ Right [] -#else - toCodeAction f = ExceptT . ReaderT $ \caa@CodeActionArgs {caaParsedModule = x} -> - x >>= \case - Just s -> flip runReaderT caa . runExceptT . toCodeAction . f . pm_parsed_source $ s - _ -> pure $ Right [] -#endif + toCodeAction = toCodeAction2 caaAnnSource instance ToCodeAction r => ToCodeAction (ExportsMap -> r) where toCodeAction = toCodeAction3 caaExportsMap