Support being built with ghc 8.0.1 (MonadFail)

Tested on an older ghc by enabling MonadFailDesugaring globally.

In TransferQueue, the lack of a MonadFail for STM exposed what would
normally be a bug in the pattern matching, although in this case an
earlier check that the queue was not empty avoided a pattern match
failure.
This commit is contained in:
Joey Hess 2019-01-05 11:54:06 -04:00
parent 6ec993252e
commit 2e0e557e75
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 16 additions and 10 deletions

View file

@ -74,6 +74,7 @@ import "mtl" Control.Monad.Reader
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM
import qualified Control.Monad.Fail as Fail
import qualified Control.Concurrent.SSem as SSem
import qualified Data.Map.Strict as M
import qualified Data.Set as S
@ -93,6 +94,7 @@ newtype Annex a = Annex { runAnnex :: ReaderT (MVar AnnexState) IO a }
MonadCatch,
MonadThrow,
MonadMask,
Fail.MonadFail,
Functor,
Applicative
)