summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorkrangelov <kr.angelov@gmail.com>2021-01-20 20:16:26 +0100
committerkrangelov <kr.angelov@gmail.com>2021-01-20 20:16:26 +0100
commit04f6f113f07712a35128a924558dac9a3f83a822 (patch)
tree6f60a5dd879f17fd7a6b0c9c5de7daf1df7e374f /src/compiler/GF/Grammar
parentbac619f025e8b3680e93cc64eddd9cebfc350249 (diff)
parentd77921005a429406398167c713969c6d807e56fa (diff)
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/Lexer.x8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x
index fe455c58a..bde0aa064 100644
--- a/src/compiler/GF/Grammar/Lexer.x
+++ b/src/compiler/GF/Grammar/Lexer.x
@@ -35,7 +35,7 @@ $u = [.\n] -- universal: any character
:-
"--" [.]* ; -- Toss single line comments
-"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
+"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
$white+ ;
@rsyms { tok ident }
@@ -138,7 +138,7 @@ data Token
res = eitherResIdent
eitherResIdent :: (Ident -> Token) -> Ident -> Token
-eitherResIdent tv s =
+eitherResIdent tv s =
case Map.lookup s resWords of
Just t -> t
Nothing -> tv s
@@ -285,6 +285,10 @@ instance Monad P where
POk s a -> unP (k a) s
PFailed posn err -> PFailed posn err
+#if !(MIN_VERSION_base(4,13,0))
+ -- Monad(fail) will be removed in GHC 8.8+
+ fail = Fail.fail
+#endif
instance Fail.MonadFail P where
fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg