summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorArianna Masciolini <uzkamascio@gmail.com>2025-08-02 19:02:30 +0200
committerArianna Masciolini <uzkamascio@gmail.com>2025-08-02 19:02:30 +0200
commit5170668ff27f2149b43d479b5d702124b04c1d98 (patch)
tree5f3f85c169ab23f2cbc4cacdabebfbd482fe948c /src/compiler/GF/Grammar
parent5776b567a2aa78902bf5e4b40cf0bbb69bdbde9a (diff)
parent65e85c5a3cba4df82547a018b4135ac63551d8df (diff)
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core into hleiss/master
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/Lexer.x4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x
index b3d271ddd..248d091a1 100644
--- a/src/compiler/GF/Grammar/Lexer.x
+++ b/src/compiler/GF/Grammar/Lexer.x
@@ -283,11 +283,11 @@ instance Functor P where
fmap = liftA
instance Applicative P where
- pure = return
+ pure a = a `seq` (P $ \s -> POk s a)
(<*>) = ap
instance Monad P where
- return a = a `seq` (P $ \s -> POk s a)
+ return = pure
(P m) >>= k = P $ \ s -> case m s of
POk s a -> unP (k a) s
PFailed posn err -> PFailed posn err