[commit: ghc] master: Lexer: remove -fno-warn-unused-do-bind (a4b0342)

git at git.haskell.org git at git.haskell.org
Sat Jul 4 13:35:38 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a4b03428e402b36ba2d36da34bcb7465f603724d/ghc

>---------------------------------------------------------------

commit a4b03428e402b36ba2d36da34bcb7465f603724d
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Jul 4 15:20:04 2015 +0200

    Lexer: remove -fno-warn-unused-do-bind


>---------------------------------------------------------------

a4b03428e402b36ba2d36da34bcb7465f603724d
 compiler/cmm/CmmLex.x | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x
index 820899b..cb71c7d 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
 
 -- -----------------------------------------------------------------------------



More information about the ghc-commits mailing list