summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorAndreas Källberg <anka.213@gmail.com>2020-08-05 16:51:24 +0200
committerAndreas Källberg <anka.213@gmail.com>2020-08-05 18:48:24 +0200
commitb8812b54b2dd70df1038a5cd953b4bbb8ac1e9b4 (patch)
tree1e61a2cd878ddf124d83903cdb63f9f5e9f48725 /src/compiler/GF/Grammar
parent251845f83ea52965b5205fd231ffa2c87bb34de6 (diff)
fix newer ghc: Don't try to be backwards compatible
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/Lexer.x10
1 files changed, 1 insertions, 9 deletions
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)