From b8812b54b2dd70df1038a5cd953b4bbb8ac1e9b4 Mon Sep 17 00:00:00 2001 From: Andreas Källberg Date: Wed, 5 Aug 2020 16:51:24 +0200 Subject: fix newer ghc: Don't try to be backwards compatible --- src/compiler/GF/Grammar/Lexer.x | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/compiler/GF/Grammar') diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index c19a32e3b..57577ba16 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -19,9 +19,6 @@ import qualified Data.Map as Map import Data.Word(Word8) import Data.Char(readLitChar) --import Debug.Trace(trace) - --- Control.Monad.Fail import will become redundant in GHC 8.8+ -import qualified Control.Monad.Fail as Fail } @@ -287,16 +284,11 @@ instance Monad P where POk s a -> unP (k a) s PFailed posn err -> PFailed posn err -#if !(MIN_VERSION_base(4,13,0)) - fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg -#endif -instance Fail.MonadFail P where +instance MonadFail P where fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg - - runP :: P a -> BS.ByteString -> Either (Posn,String) a runP p bs = snd <$> runP' p (Pn 1 0,bs) -- cgit v1.2.3