Skip to content

Commit c640f0a

Browse files
committed
fixes
1 parent c69ba63 commit c640f0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{-# LANGUAGE OverloadedLabels #-}
66
{-# LANGUAGE OverloadedStrings #-}
77
{-# LANGUAGE TypeApplications #-}
8+
{-# LANGUAGE CPP #-}
89

910
module Ide.Plugin.Fourmolu (
1011
descriptor,
@@ -101,7 +102,11 @@ provider recorder plId ideState typ contents fp fo = withIndefiniteProgress titl
101102
else do
102103
let format fourmoluConfig =
103104
bimap (mkError . show) (makeDiffTextEdit contents)
105+
#if MIN_VERSION_fourmolu(0,11,0)
106+
<$> try @OrmoluException (ormolu config fp' contents)
107+
#else
104108
<$> try @OrmoluException (ormolu config fp' (T.unpack contents))
109+
#endif
105110
where
106111
printerOpts = cfgFilePrinterOpts fourmoluConfig
107112
config =

0 commit comments

Comments
 (0)