@@ -1,6 +1,5 @@
1module Main (main) where
1module Main (main) where
3−import Control.Concurrent.Async.Lifted
4import Control.Monad.IO.Class
3import Control.Monad.IO.Class
5import Test.Tasty
4import Test.Tasty
6import Test.Tasty.HUnit
5import Test.Tasty.HUnit
@@ -20,7 +19,6 @@ main = defaultMain $ testGroup "effectful"
20 , testCase "stateM" test_stateM
19 , testCase "stateM" test_stateM
21 , testCase "deep stack" test_deepStack
20 , testCase "deep stack" test_deepStack
22 , testCase "exceptions" test_exceptions
21 , testCase "exceptions" test_exceptions
23− , testCase "concurrency" test_concurrentState
24 , testCase "local effects" test_localEffects
22 , testCase "local effects" test_localEffects
@@ -89,22 +87,6 @@ test_exceptions = runIOE $ do
89 _ <- E.throwM Ex
87 _ <- E.throwM Ex
90 modify @Int (+2)
88 modify @Int (+2)
92−test_concurrentState :: Assertion
93−test_concurrentState = runIOE . runHasInt x $ do
94− replicateConcurrently_ 2 $ do
96− assertEqual_ "x = n" x r
101− goDownward :: HasInt :> es => Int -> Eff es Int
102− goDownward acc = getInt >>= \case
106− goDownward $ acc + 1
108test_localEffects :: Assertion
90test_localEffects :: Assertion
109test_localEffects = runIOE $ do
91test_localEffects = runIOE $ do
110 x <- runHasInt 0 $ do
92 x <- runHasInt 0 $ do