Skip to content

Commit

Permalink
Replace enclosed-exceptions with safe-exceptions
Browse files Browse the repository at this point in the history
Fixes #2768
  • Loading branch information
snoyberg committed Nov 20, 2016
1 parent 89c699b commit 245e797
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Other enhancements:
[#1521](https://github.com/commercialhaskell/stack/issues/1521)
* No longer warns about missing build-tools if they are on the PATH.
[#2235](https://github.com/commercialhaskell/stack/issues/2235)
* Replace enclosed-exceptions with safe-exceptions.
[#2768](https://github.com/commercialhaskell/stack/issues/2768)

Bug fixes:

Expand Down
2 changes: 1 addition & 1 deletion src/Network/HTTP/Download.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Network.HTTP.Download
) where

import Control.Exception (Exception)
import Control.Exception.Enclosed (handleIO)
import Control.Exception.Safe (handleIO)
import Control.Monad (void)
import Control.Monad.Catch (MonadMask, throwM)
import Control.Monad.IO.Class (MonadIO, liftIO)
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Build/Cache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Stack.Build.Cache

import Control.Applicative
import Control.DeepSeq (NFData)
import Control.Exception.Enclosed (handleIO, tryAnyDeep)
import Control.Exception.Safe (handleIO, tryAnyDeep)
import Control.Monad (liftM)
import Control.Monad.Catch (MonadThrow, MonadCatch)
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Build/Execute.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Control.Arrow ((&&&), second)
import Control.Concurrent.Execute
import Control.Concurrent.MVar.Lifted
import Control.Concurrent.STM
import Control.Exception.Enclosed (catchIO)
import Control.Exception.Safe (catchIO)
import Control.Exception.Lifted
import Control.Monad (liftM, when, unless, void)
import Control.Monad.Catch (MonadCatch)
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Coverage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Stack.Coverage
) where

import Control.Applicative
import Control.Exception.Enclosed (handleIO)
import Control.Exception.Safe (handleIO)
import Control.Exception.Lifted
import Control.Monad (liftM, when, unless, void, (<=<))
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Fetch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Control.Concurrent.Async (Concurrently (..))
import Control.Concurrent.MVar.Lifted (modifyMVar, newMVar)
import Control.Concurrent.STM
import Control.Exception (assert)
import Control.Exception.Enclosed (tryIO)
import Control.Exception.Safe (tryIO)
import Control.Monad (join, liftM, unless, void, when)
import Control.Monad.Catch
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/FileWatch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Blaze.ByteString.Builder.Char.Utf8 (fromShow)
import Control.Concurrent.Async (race_)
import Control.Concurrent.STM
import Control.Exception (Exception, fromException)
import Control.Exception.Enclosed (tryAny)
import Control.Exception.Safe (tryAny)
import Control.Monad (forever, unless, when)
import qualified Data.ByteString.Lazy as L
import qualified Data.Map.Strict as Map
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Ghci.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Stack.Ghci

import Control.Applicative
import Control.Arrow (second)
import Control.Exception.Enclosed (tryAny)
import Control.Exception.Safe (tryAny)
import Control.Monad hiding (forM)
import Control.Monad.Catch
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Stack.Init
) where

import Control.Exception (assert)
import Control.Exception.Enclosed (catchAny)
import Control.Exception.Safe (catchAny)
import Control.Monad
import Control.Monad.Catch (throwM)
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/PackageDump.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Stack.PackageDump

import Control.Applicative
import Control.Arrow ((&&&))
import Control.Exception.Enclosed (tryIO)
import Control.Exception.Safe (tryIO)
import Control.Monad (liftM)
import Control.Monad.Catch
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/PackageIndex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module Stack.PackageIndex

import qualified Codec.Archive.Tar as Tar
import Control.Exception (Exception)
import Control.Exception.Enclosed (tryIO)
import Control.Exception.Safe (tryIO)
import Control.Monad (unless, when, liftM, void)
import Control.Monad.Catch (throwM)
import qualified Control.Monad.Catch as C
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Stack.Setup

import Control.Applicative
import Control.Concurrent.Async.Lifted (Concurrently(..))
import Control.Exception.Enclosed (catchIO, tryAny)
import Control.Exception.Safe (catchIO, tryAny)
import Control.Monad (liftM, when, join, void, unless)
import Control.Monad.Catch
import Control.Monad.IO.Class (MonadIO, liftIO)
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Solver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Prelude.Compat

import Control.Applicative
import Control.Exception (assert)
import Control.Exception.Enclosed (tryIO)
import Control.Exception.Safe (tryIO)
import Control.Monad (when,void,join,liftM,unless,mapAndUnzipM, zipWithM_)
import Control.Monad.Catch
import Control.Monad.IO.Class
Expand Down
2 changes: 1 addition & 1 deletion stack.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ library
, cryptohash-conduit
, directory >= 1.2.1.0
, either
, enclosed-exceptions
, errors < 2.2
, exceptions >= 0.8.0.2
, extra < 1.6
Expand Down Expand Up @@ -238,6 +237,7 @@ library
, resourcet >= 1.1.4.1
, retry >= 0.6 && < 0.8
, safe >= 0.3
, safe-exceptions
, semigroups >= 0.5 && < 0.19
, split
, stm >= 2.4.4
Expand Down

0 comments on commit 245e797

Please sign in to comment.