[commit: ghc] master: Lexer.x and Parser.y: delete dead code (8e12a21)

git at git.haskell.org git at git.haskell.org
Sat Jul 4 22:43:58 UTC 2015


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

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

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

commit 8e12a21546877003ee13d87ab784ee1b9d4bd4d7
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Jul 4 23:06:06 2015 +0200

    Lexer.x and Parser.y: delete dead code


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

8e12a21546877003ee13d87ab784ee1b9d4bd4d7
 compiler/parser/Lexer.x  | 11 +----------
 compiler/parser/Parser.y |  7 -------
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index df7347e..a73487b 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -637,8 +637,6 @@ data Token
   | ITqconid  (FastString,FastString)
   | ITqvarsym (FastString,FastString)
   | ITqconsym (FastString,FastString)
-  | ITprefixqvarsym (FastString,FastString)
-  | ITprefixqconsym (FastString,FastString)
 
   | ITdupipvarid   FastString   -- GHC extension: implicit param: ?x
 
@@ -1147,11 +1145,9 @@ varid span buf len =
 conid :: StringBuffer -> Int -> Token
 conid buf len = ITconid $! lexemeToFastString buf len
 
-qvarsym, qconsym, prefixqvarsym, prefixqconsym :: StringBuffer -> Int -> Token
+qvarsym, qconsym :: StringBuffer -> Int -> Token
 qvarsym buf len = ITqvarsym $! splitQualName buf len False
 qconsym buf len = ITqconsym $! splitQualName buf len False
-prefixqvarsym buf len = ITprefixqvarsym $! splitQualName buf len True
-prefixqconsym buf len = ITprefixqconsym $! splitQualName buf len True
 
 varsym, consym :: Action
 varsym = sym ITvarsym
@@ -1653,11 +1649,6 @@ quasiquote_error start = do
 -- -----------------------------------------------------------------------------
 -- Warnings
 
-warn :: WarningFlag -> SDoc -> Action
-warn option warning srcspan _buf _len = do
-    addWarning option (RealSrcSpan srcspan) warning
-    lexToken
-
 warnTab :: Action
 warnTab srcspan _buf _len = do
     addTabWarning srcspan
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index a2d89b2..d697253 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -546,8 +546,6 @@ for some background.
  QCONID         { L _ (ITqconid   _) }
  QVARSYM        { L _ (ITqvarsym  _) }
  QCONSYM        { L _ (ITqconsym  _) }
- PREFIXQVARSYM  { L _ (ITprefixqvarsym  _) }
- PREFIXQCONSYM  { L _ (ITprefixqconsym  _) }
 
  IPDUPVARID     { L _ (ITdupipvarid   _) }              -- GHC extension
 
@@ -2884,7 +2882,6 @@ qtyconop :: { Located RdrName } -- Qualified or unqualified
 
 qtycon :: { Located RdrName }   -- Qualified or unqualified
         : QCONID            { sL1 $1 $! mkQual tcClsName (getQCONID $1) }
-        | PREFIXQCONSYM     { sL1 $1 $! mkQual tcClsName (getPREFIXQCONSYM $1) }
         | tycon             { $1 }
 
 tycon   :: { Located RdrName }  -- Unqualified
@@ -2982,7 +2979,6 @@ qvar    :: { Located RdrName }
 qvarid :: { Located RdrName }
         : varid               { $1 }
         | QVARID              { sL1 $1 $! mkQual varName (getQVARID $1) }
-        | PREFIXQVARSYM       { sL1 $1 $! mkQual varName (getPREFIXQVARSYM $1) }
 
 -- Note that 'role' and 'family' get lexed separately regardless of
 -- the use of extensions. However, because they are listed here, this
@@ -3047,7 +3043,6 @@ special_sym : '!'       {% ams (sL1 $1 (fsLit "!")) [mj AnnBang $1] }
 qconid :: { Located RdrName }   -- Qualified or unqualified
         : conid              { $1 }
         | QCONID             { sL1 $1 $! mkQual dataName (getQCONID $1) }
-        | PREFIXQCONSYM      { sL1 $1 $! mkQual dataName (getPREFIXQCONSYM $1) }
 
 conid   :: { Located RdrName }
         : CONID                { sL1 $1 $ mkUnqual dataName (getCONID $1) }
@@ -3146,8 +3141,6 @@ getQVARID       (L _ (ITqvarid   x)) = x
 getQCONID       (L _ (ITqconid   x)) = x
 getQVARSYM      (L _ (ITqvarsym  x)) = x
 getQCONSYM      (L _ (ITqconsym  x)) = x
-getPREFIXQVARSYM (L _ (ITprefixqvarsym  x)) = x
-getPREFIXQCONSYM (L _ (ITprefixqconsym  x)) = x
 getIPDUPVARID   (L _ (ITdupipvarid   x)) = x
 getCHAR         (L _ (ITchar   _ x)) = x
 getSTRING       (L _ (ITstring _ x)) = x



More information about the ghc-commits mailing list