Skip to content

Commit

Permalink
Remove monad-unlift (tamarin-prover#421)
Browse files Browse the repository at this point in the history
monad-unlift has been abandoned for years. Let's drop its usage.
  • Loading branch information
felixonmars committed Jul 12, 2021
1 parent a8d5cc1 commit 52fb4f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/Web/Handler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import Web.Types
import Yesod.Core

import Control.Monad.Trans.Resource (runResourceT)
import Control.Monad.Trans.Unlift

import Data.Label
import Data.Maybe
Expand All @@ -103,8 +102,7 @@ import Control.Applicative
import Control.Concurrent
import qualified Control.Concurrent.Thread as Thread ( forkIO )
import Control.DeepSeq
import Control.Exception.Base
import qualified Control.Exception.Lifted as E
import Control.Exception.Base as E
import Control.Monad
import qualified Data.Binary as Bin
import Data.Time.LocalTime
Expand Down Expand Up @@ -300,11 +298,11 @@ getThreads = do
------------------------------------------------------------------------------

-- | Print exceptions, if they happen.
traceExceptions :: MonadBaseControl IO m => String -> m a -> m a
traceExceptions :: String -> IO a -> IO a
traceExceptions info =
E.handle handler
where
handler :: MonadBaseControl IO m => E.SomeException -> m a
handler :: E.SomeException -> IO a
handler e =
trace (info ++ ": exception `" ++ show e ++ "'") $ E.throwIO e

Expand All @@ -329,7 +327,7 @@ responseToJson = go
-- | Fully evaluate a value in a thread that can be canceled.
evalInThread :: NFData a
=> IO a
-> Handler (Either SomeException a)
-> Handler (Either E.SomeException a)
evalInThread io = do
renderF <- getUrlRender
maybeRoute <- getCurrentRoute
Expand Down
2 changes: 0 additions & 2 deletions tamarin-prover.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ executable tamarin-prover
, filepath
, gitrev
, http-types
, lifted-base
, monad-unlift
, mtl
, parsec
, process
Expand Down

0 comments on commit 52fb4f8

Please sign in to comment.