Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace enclosed-exceptions with safe-exceptions #2791

Merged
merged 2 commits into from
Nov 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions stack-7.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extra-deps:
- text-metrics-0.1.0
- pid1-0.1.0.0
- file-embed-0.0.10
- safe-exceptions-0.1.4.0
flags:
time-locale-compat:
old-locale: false
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