Skip to content

Commit af2bdfb

Browse files
committed
force KeySet before adding to the ResultDeps
1 parent 4a1a52e commit af2bdfb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hls-graph/src/Development/IDE/Graph/Internal/Action.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Development.IDE.Graph.Internal.Action
1818
) where
1919

2020
import Control.Concurrent.Async
21+
import Control.DeepSeq (force)
2122
import Control.Exception
2223
import Control.Monad.IO.Class
2324
import Control.Monad.Trans.Class
@@ -120,7 +121,7 @@ apply ks = do
120121
stack <- Action $ asks actionStack
121122
(is, vs) <- liftIO $ build db stack ks
122123
ref <- Action $ asks actionDeps
123-
liftIO $ modifyIORef' ref (ResultDeps [fromListKeySet $ toList is] <>)
124+
liftIO $ modifyIORef' ref (ResultDeps [force $ fromListKeySet $ toList is] <>)
124125
pure vs
125126

126127
-- | Evaluate a list of keys without recording any dependencies.

hls-graph/src/Development/IDE/Graph/Internal/Key.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ renderKey :: Key -> Text
101101
renderKey (lookupKeyValue -> KeyValue _ t) = t
102102

103103
newtype KeySet = KeySet IntSet
104-
deriving newtype (Eq, Ord, Semigroup, Monoid)
104+
deriving newtype (Eq, Ord, Semigroup, Monoid, NFData)
105105

106106
instance Show KeySet where
107107
showsPrec p (KeySet is)= showParen (p > 10) $

0 commit comments

Comments
 (0)