Fix build with ghc-8.8.x.
The 'fail' method has been moved to the 'MonadFail' class. I made the changes so that the code still compiles with previous versions of 'base' that don't have the new MonadFail class exported by Prelude yet.
This commit is contained in:
parent
c257951b85
commit
73cf523a4b
4 changed files with 13 additions and 9 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
module CmdLine.GitAnnex.Options where
|
||||
|
||||
import Control.Monad.Fail as Fail ( MonadFail(..) )
|
||||
import Options.Applicative
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -215,8 +216,8 @@ parseAllOption = flag' WantAllKeys
|
|||
<> help "operate on all versions of all files"
|
||||
)
|
||||
|
||||
parseKey :: Monad m => String -> m Key
|
||||
parseKey = maybe (fail "invalid key") return . deserializeKey
|
||||
parseKey :: MonadFail m => String -> m Key
|
||||
parseKey = maybe (Fail.fail "invalid key") return . deserializeKey
|
||||
|
||||
-- Options to match properties of annexed files.
|
||||
annexedMatchingOptions :: [GlobalOption]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue