Skip to content

Commit 69edc9c

Browse files
committed
Trying to address stylish-haskell parse errors
1 parent 357c681 commit 69edc9c

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

ghcide/src/Development/IDE/GHC/Compat/Env.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,21 @@ import HscTypes as Env
9191
import Module
9292
#endif
9393

94-
#if MIN_VERSION_ghc(9,3,0)
95-
hsc_EPS :: HscEnv -> UnitEnv
96-
hsc_EPS = hsc_unit_env
97-
#endif
98-
99-
#if MIN_VERSION_ghc(9,0,0)
10094
#if !MIN_VERSION_ghc(9,2,0)
95+
#if MIN_VERSION_ghc(9,0,0)
10196
import qualified Data.Set as Set
10297
#endif
10398
#endif
99+
104100
#if !MIN_VERSION_ghc(9,2,0)
105101
import Data.IORef
106102
#endif
107103

104+
#if MIN_VERSION_ghc(9,3,0)
105+
hsc_EPS :: HscEnv -> UnitEnv
106+
hsc_EPS = hsc_unit_env
107+
#endif
108+
108109
#if !MIN_VERSION_ghc(9,2,0)
109110
type UnitEnv = ()
110111
newtype Logger = Logger { log_action :: LogAction }

ghcide/src/Development/IDE/GHC/Compat/Plugins.hs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ module Development.IDE.GHC.Compat.Plugins (
2121
#if MIN_VERSION_ghc(9,2,0)
2222
import qualified GHC.Driver.Env as Env
2323
#endif
24-
import GHC.Driver.Plugins (Plugin (..),
24+
import GHC.Driver.Plugins (ParsedResult (..),
25+
Plugin (..),
2526
PluginWithArgs (..),
27+
PsMessages (..),
2628
StaticPlugin (..),
27-
#if MIN_VERSION_ghc(9,3,0)
28-
staticPlugins,
29-
ParsedResult(..),
30-
PsMessages(..),
31-
#endif
32-
defaultPlugin, withPlugins)
29+
defaultPlugin,
30+
staticPlugins, withPlugins)
3331
import qualified GHC.Runtime.Loader as Loader
3432
#elif MIN_VERSION_ghc(8,8,0)
3533
import qualified DynamicLoading as Loader
@@ -48,11 +46,11 @@ applyPluginsParsedResultAction env dflags ms hpm_annotations parsed = do
4846
-- Apply parsedResultAction of plugins
4947
let applyPluginAction p opts = parsedResultAction p opts ms
5048
#if MIN_VERSION_ghc(9,3,0)
51-
fmap (hpm_module . parsedResultModule) $
49+
fmap (hpm_module . parsedResultModule)
5250
#else
53-
fmap hpm_module $
51+
fmap hpm_module
5452
#endif
55-
runHsc env $ withPlugins
53+
$ runHsc env $ withPlugins
5654
#if MIN_VERSION_ghc(9,3,0)
5755
(Env.hsc_plugins env)
5856
#elif MIN_VERSION_ghc(9,2,0)

0 commit comments

Comments
 (0)