diff options
author | Ian Lynagh <igloo@earth.li> | 2008-01-24 15:58:27 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-01-24 15:58:27 +0000 |
commit | 0c3e42b73205ec0811ab1899fa60bfdebd4ae77d (patch) | |
tree | 0374f0c37d38700e802158ea46bf8ad3ee728ec8 /compiler/parser | |
parent | bf1cff988c19adb2937294e41f6d0a0f41f1168d (diff) | |
download | haskell-0c3e42b73205ec0811ab1899fa60bfdebd4ae77d.tar.gz |
Make the Parser Monad's return strict
Diffstat (limited to 'compiler/parser')
-rw-r--r-- | compiler/parser/Lexer.x | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 2aa8f4f66a..8d2a9a5cc8 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 -> |