File tree 2 files changed +3
-3
lines changed
ghcide/src/Development/IDE
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ codeAction lsp state _ (TextDocumentIdentifier uri) _range CodeActionContext{_di
86
86
<*> use GhcSession `traverse` mbFile
87
87
<*> use GetAnnotatedParsedSource `traverse` mbFile
88
88
-- This is quite expensive 0.6-0.7s on GHC
89
- pkgExports <- fromMaybe mempty ( envPackageExports <$> env)
89
+ pkgExports <- maybe mempty envPackageExports env
90
90
localExports <- readVar (exportsMap $ shakeExtras state)
91
91
let
92
92
exportsMap = localExports <> pkgExports
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import TcRnMonad (initIfaceLoad, WhereFrom (ImportByUser))
24
24
import LoadIface (loadInterface )
25
25
import qualified Maybes
26
26
import OpenTelemetry.Eventlog (withSpan )
27
- import Control.Monad.Extra (mapMaybeM , join )
27
+ import Control.Monad.Extra (mapMaybeM , join , eitherM )
28
28
import Control.Concurrent.Extra (newVar , modifyVar )
29
29
import Control.Concurrent.Async (Async , async , waitCatch )
30
30
import Control.Exception (throwIO , mask )
@@ -127,7 +127,7 @@ instance Binary HscEnvEq where
127
127
onceAsync :: IO a -> IO (IO a )
128
128
onceAsync act = do
129
129
var <- newVar OncePending
130
- let run as = either throwIO pure =<< waitCatch as
130
+ let run as = eitherM throwIO pure ( waitCatch as)
131
131
pure $ mask $ \ unmask -> join $ modifyVar var $ \ v -> case v of
132
132
OnceRunning x -> pure (v, unmask $ run x)
133
133
OncePending -> do
You can’t perform that action at this time.
0 commit comments