Skip to content

Commit 95c8682

Browse files
Remove redundant CPP
1 parent 895c17c commit 95c8682

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

Diff for: plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs

+8-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE DataKinds #-}
32
{-# LANGUAGE LambdaCase #-}
43
{-# LANGUAGE OverloadedLabels #-}
@@ -99,16 +98,14 @@ provider recorder plId ideState token typ contents fp fo = ExceptT $ pluginWithI
9998
errorMessage = "Failed to load " <> T.pack f <> ": " <> T.pack (show err)
10099

101100
let config =
102-
#if MIN_VERSION_fourmolu(0,13,0)
103-
refineConfig ModuleSource Nothing Nothing Nothing
104-
#endif
105-
defaultConfig
106-
{ cfgDynOptions = map DynOption fileOpts
107-
, cfgFixityOverrides = cfgFileFixities
108-
, cfgRegion = region
109-
, cfgDebug = False
110-
, cfgPrinterOpts = resolvePrinterOpts [lspPrinterOpts, cfgFilePrinterOpts]
111-
}
101+
refineConfig ModuleSource Nothing Nothing Nothing $
102+
defaultConfig
103+
{ cfgDynOptions = map DynOption fileOpts
104+
, cfgFixityOverrides = cfgFileFixities
105+
, cfgRegion = region
106+
, cfgDebug = False
107+
, cfgPrinterOpts = resolvePrinterOpts [lspPrinterOpts, cfgFilePrinterOpts]
108+
}
112109
ExceptT . liftIO $
113110
bimap (PluginInternalError . T.pack . show) (InL . makeDiffTextEdit contents)
114111
<$> try @OrmoluException (ormolu config fp' contents)
@@ -199,8 +196,3 @@ newtype CLIVersionInfo = CLIVersionInfo
199196

200197
mwhen :: Monoid a => Bool -> a -> a
201198
mwhen b x = if b then x else mempty
202-
203-
#if !MIN_VERSION_fourmolu(0,14,0)
204-
resolvePrinterOpts :: [PrinterOptsPartial] -> PrinterOptsTotal
205-
resolvePrinterOpts = foldr fillMissingPrinterOpts defaultPrinterOpts
206-
#endif

0 commit comments

Comments
 (0)