summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
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