Skip to content

Commit eab6796

Browse files
committed
fix test
1 parent cf6fe10 commit eab6796

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ghcide/test/exe/Progress.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
{-# LANGUAGE DataKinds #-}
2+
{-# LANGUAGE GADTs #-}
13
{-# LANGUAGE PackageImports #-}
4+
25
module Progress (tests) where
36

47
import Control.Concurrent.STM
@@ -44,15 +47,15 @@ reportProgressTests = testGroup "recordProgress"
4447
InProgressModel{..} <- p
4548
(done, todo) @?= (length (filter (==0) (Map.elems current)), Map.size current)
4649

47-
fromModel :: InProgressModel -> IO InProgressState
50+
fromModel :: InProgressModel -> IO (InProgressState 'ProgressStateInsideTracking)
4851
fromModel InProgressModel{..} = do
4952
doneVar <- newTVarIO done
5053
todoVar <- newTVarIO todo
5154
currentVar <- STM.newIO
5255
atomically $ for_ (Map.toList current) $ \(k,v) -> STM.insert v k currentVar
5356
return InProgressState{..}
5457

55-
toModel :: InProgressState -> IO InProgressModel
58+
toModel :: InProgressState 'ProgressStateInsideTracking -> IO InProgressModel
5659
toModel InProgressState{..} = atomically $ do
5760
done <- readTVar doneVar
5861
todo <- readTVar todoVar

0 commit comments

Comments
 (0)