Skip to content

Commit

Permalink
mask the getOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed May 21, 2024
1 parent b53c8c5 commit a8ecbf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir = do
let res' = toAbsolutePath <$> res
return $ normalise <$> res'

dummyAs <- async $ return (error "Uninitialised")
runningCradle <- newVar dummyAs :: IO (Var (Async (IdeResult HscEnvEq,[FilePath])))
-- dummyAs <- async $ return (error "Uninitialised")
-- runningCradle <- newVar dummyAs :: IO (Var (Async (IdeResult HscEnvEq,[FilePath])))

return $ do
clientConfig <- getClientConfigAction
Expand Down Expand Up @@ -749,7 +749,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir = do
-- void $ wait as
-- asyncRes <- async $ getOptions file
-- return (asyncRes, wait asyncRes)
opts <- UnlifIO.withMVar cradleLock $ \_ -> getOptions file
opts <- UnlifIO.withMVarMasked cradleLock $ \_ -> getOptions file
pure $ (fmap . fmap) toAbsolutePath opts


Expand Down

0 comments on commit a8ecbf9

Please sign in to comment.