Skip to content

Commit 2037c81

Browse files
committed
stylish-haskell parse errors solved
* Env: Changing order (import) * Plugins: Dangling `$`
1 parent 357c681 commit 2037c81

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ 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-
9994
#if MIN_VERSION_ghc(9,0,0)
10095
#if !MIN_VERSION_ghc(9,2,0)
10196
import qualified Data.Set as Set
@@ -105,6 +100,11 @@ import qualified Data.Set as Set
105100
import Data.IORef
106101
#endif
107102

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

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import qualified GHC.Driver.Env as Env
2424
import GHC.Driver.Plugins (Plugin (..),
2525
PluginWithArgs (..),
2626
StaticPlugin (..),
27+
defaultPlugin, withPlugins)
2728
#if MIN_VERSION_ghc(9,3,0)
28-
staticPlugins,
29-
ParsedResult(..),
30-
PsMessages(..),
29+
import GHC.Driver.Plugins (ParsedResult (..),
30+
PsMessages (..),
31+
staticPlugins)
3132
#endif
32-
defaultPlugin, withPlugins)
3333
import qualified GHC.Runtime.Loader as Loader
3434
#elif MIN_VERSION_ghc(8,8,0)
3535
import qualified DynamicLoading as Loader
@@ -48,11 +48,10 @@ applyPluginsParsedResultAction env dflags ms hpm_annotations parsed = do
4848
-- Apply parsedResultAction of plugins
4949
let applyPluginAction p opts = parsedResultAction p opts ms
5050
#if MIN_VERSION_ghc(9,3,0)
51-
fmap (hpm_module . parsedResultModule) $
51+
fmap (hpm_module . parsedResultModule) $ runHsc env $ withPlugins
5252
#else
53-
fmap hpm_module $
53+
fmap hpm_module $ runHsc env $ withPlugins
5454
#endif
55-
runHsc env $ withPlugins
5655
#if MIN_VERSION_ghc(9,3,0)
5756
(Env.hsc_plugins env)
5857
#elif MIN_VERSION_ghc(9,2,0)

0 commit comments

Comments
 (0)