From 8aa0ef9ccf4bd1a2b02925d7c1642c5d019e8365 Mon Sep 17 00:00:00 2001 From: Eduardo Trujillo <ed@chromabits.com> Date: Sun, 20 Dec 2020 14:47:25 -0800 Subject: [PATCH] Update to support base >= 0.13 --- Data/Git/Monad.hs | 8 +++++++- git.cabal | 2 +- stack.yaml | 9 +++++++-- stack.yaml.lock | 12 ++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 stack.yaml.lock diff --git a/Data/Git/Monad.hs b/Data/Git/Monad.hs index 480af9f..b3369d2 100644 --- a/Data/Git/Monad.hs +++ b/Data/Git/Monad.hs @@ -127,7 +127,7 @@ instance Resolvable Git.RefName where -- | Basic operations common between the different Monads defined in this -- package. -class (Functor m, Applicative m, Monad m) => GitMonad m where +class (Functor m, Applicative m, Monad m, MonadFail m) => GitMonad m where -- | the current Monad must allow access to the current Git getGit :: m (Git.Git SHA1) liftGit :: IO a -> m a @@ -240,6 +240,8 @@ instance Applicative GitM where instance Monad GitM where return = returnGitM (>>=) = bindGitM + +instance MonadFail GitM where fail = failGitM instance GitMonad GitM where @@ -313,6 +315,8 @@ instance Applicative CommitAccessM where instance Monad CommitAccessM where return = returnCommitAccessM (>>=) = bindCommitAccessM + +instance MonadFail CommitAccessM where fail = failCommitAccessM instance GitMonad CommitAccessM where @@ -474,6 +478,8 @@ instance Applicative CommitM where instance Monad CommitM where return = returnCommitM (>>=) = bindCommitM + +instance MonadFail CommitM where fail = failCommitM instance GitMonad CommitM where diff --git a/git.cabal b/git.cabal index 1d5748e..72e6935 100644 --- a/git.cabal +++ b/git.cabal @@ -26,7 +26,7 @@ data-files: README.md extra-source-files: tests/*.hs Library - Build-Depends: base >= 4 && < 5 + Build-Depends: base >= 4.13 && < 5 , basement , bytestring >= 0.9 , containers diff --git a/stack.yaml b/stack.yaml index 34c4074..bed42e7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,3 +1,8 @@ -# ~*~ auto-generated by haskell-ci with config : 0a4c6a0fd68c5b852764201c037cae7f29b1cb3f3856f78d1a20fe2e44845097 ~*~ -{ resolver: lts-13.5, packages: [ '.' ], extra-deps: [], flags: {} } +resolver: nightly-2020-12-12 +packages: + - '.' + +extra-deps: [] + +flags: {} diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..aa36300 --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 556770 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2020/12/12.yaml + sha256: 168062744e171ba6949149ee702483d2186ddfbb6038508576d6c5093245f534 + original: nightly-2020-12-12 -- GitLab