summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-07-04 15:20:04 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-07-04 15:35:50 +0200
commita4b03428e402b36ba2d36da34bcb7465f603724d (patch)
tree20d9323d41d99ca528be4738b60d3011e895f0d0
parentced27def2d33119ed9fcc22f92856f132fd72217 (diff)
downloadhaskell-a4b03428e402b36ba2d36da34bcb7465f603724d.tar.gz
Lexer: remove -fno-warn-unused-do-bind
-rw-r--r--compiler/cmm/CmmLex.x9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x
index 820899b8d4..cb71c7d7de 100644
--- a/compiler/cmm/CmmLex.x
+++ b/compiler/cmm/CmmLex.x
@@ -11,7 +11,6 @@
-----------------------------------------------------------------------------
{
-{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
@@ -190,7 +189,7 @@ begin :: Int -> Action
begin code _span _str _len = do pushLexState code; lexToken
pop :: Action
-pop _span _buf _len = do popLexState; lexToken
+pop _span _buf _len = popLexState >> lexToken
special_char :: Action
special_char span buf len = return (L span (CmmT_SpecChar (currentChar buf)))
@@ -291,16 +290,14 @@ setLine code span buf len = do
setSrcLoc (mkRealSrcLoc (srcSpanFile span) (fromIntegral line - 1) 1)
-- subtract one: the line number refers to the *following* line
-- trace ("setLine " ++ show line) $ do
- popLexState
- pushLexState code
+ popLexState >> pushLexState code
lexToken
setFile :: Int -> Action
setFile code span buf len = do
let file = lexemeToFastString (stepOn buf) (len-2)
setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))
- popLexState
- pushLexState code
+ popLexState >> pushLexState code
lexToken
-- -----------------------------------------------------------------------------