Skip to content

Commit e626e20

Browse files
committed
hilnts
1 parent aca2b4b commit e626e20

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ghcide/.hlint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
- {name: GeneralizedNewtypeDeriving, within: []}
7878
- {name: LambdaCase, within: []}
7979
- {name: NamedFieldPuns, within: []}
80-
- {name: PackageImports, within: []}
8180
- {name: RecordWildCards, within: []}
8281
- {name: ScopedTypeVariables, within: []}
8382
- {name: StandaloneDeriving, within: []}

ghcide/src/Development/IDE/Core/ProgressReporting.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ module Development.IDE.Core.ProgressReporting
1515

1616
import Control.Concurrent.Async
1717
import Control.Concurrent.STM (TVar, atomically, newTVarIO,
18-
readTVar, writeTVar)
18+
readTVar, readTVarIO,
19+
writeTVar)
1920
import Control.Concurrent.Strict
2021
import Control.Monad.Extra
2122
import Control.Monad.IO.Class
@@ -156,8 +157,8 @@ delayedProgressReporting before after lspEnv optProgressStyle = do
156157
loop _ _ | optProgressStyle == NoProgress =
157158
forever $ liftIO $ threadDelay maxBound
158159
loop id prev = do
159-
done <- liftIO $ atomically $ readTVar doneVar
160-
todo <- liftIO $ atomically $ readTVar todoVar
160+
done <- liftIO $ readTVarIO doneVar
161+
todo <- liftIO $ readTVarIO todoVar
161162
liftIO $ sleep after
162163
if todo == 0 then loop id 0 else do
163164
let next = 100 * fromIntegral done / fromIntegral todo

0 commit comments

Comments
 (0)