From 0c3e42b73205ec0811ab1899fa60bfdebd4ae77d Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 24 Jan 2008 15:58:27 +0000 Subject: [PATCH] Make the Parser Monad's return strict --- compiler/parser/Lexer.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 2aa8f4f..8d2a9a5 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1410,7 +1410,7 @@ instance Monad P where fail = failP returnP :: a -> P a -returnP a = P $ \s -> POk s a +returnP a = a `seq` (P $ \s -> POk s a) thenP :: P a -> (a -> P b) -> P b (P m) `thenP` k = P $ \ s -> -- 1.7.10.4