Skip to content

Commit 424ca2e

Browse files
committed
hlint
1 parent dde5f22 commit 424ca2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ghcide/src/Development/IDE/Types/HscEnvEq.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import TcRnMonad (initIfaceLoad, WhereFrom (ImportByUser))
2424
import LoadIface (loadInterface)
2525
import qualified Maybes
2626
import OpenTelemetry.Eventlog (withSpan)
27-
import Control.Monad.Extra (mapMaybeM, join)
27+
import Control.Monad.Extra (mapMaybeM, join, eitherM)
2828
import Control.Concurrent.Extra (newVar, modifyVar)
2929
import Control.Concurrent.Async (Async, async, waitCatch)
3030
import Control.Exception (throwIO, mask)
@@ -127,7 +127,7 @@ instance Binary HscEnvEq where
127127
onceAsync :: IO a -> IO (IO a)
128128
onceAsync act = do
129129
var <- newVar OncePending
130-
let run as = either throwIO pure =<< waitCatch as
130+
let run as = eitherM throwIO pure (waitCatch as)
131131
pure $ mask $ \unmask -> join $ modifyVar var $ \v -> case v of
132132
OnceRunning x -> pure (v, unmask $ run x)
133133
OncePending -> do

0 commit comments

Comments
 (0)