diff options
| author | Andreas Källberg <anka.213@gmail.com> | 2020-08-05 16:20:35 +0200 |
|---|---|---|
| committer | Andreas Källberg <anka.213@gmail.com> | 2020-08-05 18:48:24 +0200 |
| commit | 251845f83ea52965b5205fd231ffa2c87bb34de6 (patch) | |
| tree | 66b22f4370f09b673a44607ed1b0cc1294a2f74e /src/compiler/GF/Compile | |
| parent | deddde953f9e9b71e35a80bb29af0ce81e1dc6d0 (diff) | |
First attempt at fixing incompabilities with newer cabal
Diffstat (limited to 'src/compiler/GF/Compile')
| -rw-r--r-- | src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs index 8fd6023b3..fab3173dc 100644 --- a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs +++ b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs @@ -19,6 +19,10 @@ import GF.Text.Pretty import Data.List (nub, (\\), tails) import qualified Data.IntMap as IntMap import Data.Maybe(fromMaybe,isNothing) +#if !MIN_VERSION_base(4,11,0) +-- Control.Monad.Fail import is redundant since GHC 8.8.1 +import qualified Control.Monad.Fail as Fail +#endif checkLType :: GlobalEnv -> Term -> Type -> Check (Term, Type) checkLType ge t ty = runTcM $ do @@ -646,8 +650,19 @@ instance Monad TcM where f >>= g = TcM (\ms msgs -> case unTcM f ms msgs of TcOk x ms msgs -> unTcM (g x) ms msgs TcFail msgs -> TcFail msgs) + +#if !(MIN_VERSION_base(4,13,0)) + fail = tcError . pp +#endif + +instance Fail.MonadFail TcM where fail = tcError . pp + +-- Control.Monad.Fail import will become redundant in GHC 8.8+ +import qualified Control.Monad.Fail as Fail + + instance Applicative TcM where pure = return (<*>) = ap |
