@@ -50,7 +50,7 @@ test_deepStack = runIOE $ do
50 U.assertEqual "n" 15 n
50 U.assertEqual "n" 15 n
52test_exceptions :: Assertion
52test_exceptions :: Assertion
53−test_exceptions = runIOE . runExcept $ do
53+test_exceptions = runIOE $ do
54 testTry "exceptions" E.try
54 testTry "exceptions" E.try
55 testCatch "exceptions" E.catch
55 testCatch "exceptions" E.catch
56 testTry "lifted-base" LE.try
56 testTry "lifted-base" LE.try
@@ -60,8 +60,8 @@ test_exceptions = runIOE . runExcept $ do
63− -> (forall a es. (IOE :> es, Except :> es) => Eff es a -> Eff es (Either U.Ex a))
63+ -> (forall a es. IOE :> es => Eff es a -> Eff es (Either U.Ex a))
64− -> Eff '[Except, IOE] ()
64+ -> Eff '[IOE] ()
65 testTry lib tryImpl = do
65 testTry lib tryImpl = do
66 e <- tryImpl $ runState (0::Int) action
66 e <- tryImpl $ runState (0::Int) action
67 U.assertEqual (lib ++ " - exception caught") e (Left U.Ex)
67 U.assertEqual (lib ++ " - exception caught") e (Left U.Ex)
@@ -70,15 +70,15 @@ test_exceptions = runIOE . runExcept $ do
73− -> (forall a es. (IOE :> es, Except :> es) => Eff es a -> (U.Ex -> Eff es a) -> Eff es a)
73+ -> (forall a es. IOE :> es => Eff es a -> (U.Ex -> Eff es a) -> Eff es a)
74− -> Eff '[Except, IOE] ()
74+ -> Eff '[IOE] ()
75 testCatch lib catchImpl = do
75 testCatch lib catchImpl = do
76 s <- execState (0::Int) $ do
76 s <- execState (0::Int) $ do
77 _ <- (evalState () action) `catchImpl` \U.Ex -> modify @Int (+4)
77 _ <- (evalState () action) `catchImpl` \U.Ex -> modify @Int (+4)
78 modify @Int (+8)
78 modify @Int (+8)
79 U.assertEqual (lib ++ " - state correctly updated") s 13
79 U.assertEqual (lib ++ " - state correctly updated") s 13
81− action :: (State Int :> es, Except :> es) => Eff es ()
81+ action :: State Int :> es => Eff es ()
82 action = do
82 action = do
83 modify @Int (+1)
83 modify @Int (+1)
84 _ <- E.throwM U.Ex
84 _ <- E.throwM U.Ex