Skip to content

Commit d965e02

Browse files
Break out fmap
1 parent f3225ad commit d965e02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Control.Exception (IOException, try)
1616
import Control.Lens ((^.))
1717
import Control.Monad
1818
import Control.Monad.IO.Class
19-
import Data.Bifunctor (first)
19+
import Data.Bifunctor (bimap, first)
2020
import Data.Maybe
2121
import Data.Text (Text)
2222
import qualified Data.Text as T
@@ -100,8 +100,8 @@ provider recorder plId ideState typ contents fp fo = withIndefiniteProgress titl
100100
pure . Left . responseError $ "Fourmolu failed with exit code " <> T.pack (show n)
101101
else do
102102
let format fourmoluConfig =
103-
first (mkError . show)
104-
<$> try @OrmoluException (makeDiffTextEdit contents <$> ormolu config fp' (T.unpack contents))
103+
bimap (mkError . show) (makeDiffTextEdit contents)
104+
<$> try @OrmoluException (ormolu config fp' (T.unpack contents))
105105
where
106106
printerOpts =
107107
#if MIN_VERSION_fourmolu(0,7,0)

0 commit comments

Comments
 (0)