We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10619dc commit ea63b62Copy full SHA for ea63b62
test/Control/Carrier/Logger/IOSpec.hs
@@ -1,9 +1,11 @@
1
{-# LANGUAGE OverloadedStrings #-}
2
+{-# LANGUAGE TypeApplications #-}
3
4
module Control.Carrier.Logger.IOSpec (
5
spec,
6
) where
7
8
+import Control.Exception (try, IOException)
9
import Control.Carrier.Lift (runM)
10
import Control.Carrier.Logger.IO (runLoggerIO, singleHandle)
11
import Control.Monad.Logger (logDebugN, logInfoN, logWarnN)
@@ -17,7 +19,7 @@ spec = do
17
19
(fp, h) <- openTempFile "." "LoggerIOC.log"
18
20
_ <- runM (runLoggerIO (singleHandle h) action)
21
hClose h
- readFile fp <* removePathForcibly fp
22
+ readFile fp <* (try @IOException (removePathForcibly fp))
23
24
describe "LoggerIOC" $ do
25
it "no log" $ do
0 commit comments