[commit: ghc] master: Parser: remove unused rule (copy/paste error) (288c7c6)

git at git.haskell.org git at git.haskell.org
Sat Dec 13 21:05:05 UTC 2014


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

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

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

commit 288c7c6ad40dbb81bf559c826fbc480f7882f250
Author: Sergei Trofimovich <siarheit at google.com>
Date:   Sat Dec 13 21:05:42 2014 +0000

    Parser: remove unused rule (copy/paste error)
    
    Summary:
    Found out when tracking down conflicts reported by happy.
    It was accidentally introduced in large Api Annotations
    patch: 803fc5db31f084b73713342cdceaed5a9c664267
    
    Before:
      unused rules: 1
      shift/reduce conflicts:  60
      reduce/reduce conflicts: 16
    After:
      shift/reduce conflicts:  60
      reduce/reduce conflicts: 12
    
    Unused rule is seen in happy's --info= output as:
        rule 180 is unused
        ...
        decl_cls -> 'default' infixexp '::' sigtypedoc     (180)
        decl_cls -> 'default' infixexp '::' sigtypedoc     (181)
    
    While at it removed 'q' typo in parser conflict log :)
    
    Signed-off-by: Sergei Trofimovich <siarheit at google.com>
    
    Reviewers: simonmar, austin, alanz
    
    Reviewed By: alanz
    
    Subscribers: carter, thomie
    
    Differential Revision: https://phabricator.haskell.org/D569


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

288c7c6ad40dbb81bf559c826fbc480f7882f250
 compiler/parser/Parser.y | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index ed111c0..1849fb4 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -121,7 +121,7 @@ would think the two should never occur in the same context.
 
 Conflicts: 34 shift/reduce
            1 reduce/reduce
-q
+
 The reduce/reduce conflict is weird.  It's between tyconsym and consym, and I
 would think the two should never occur in the same context.
 
@@ -1067,12 +1067,6 @@ decl_cls  : at_decl_cls                 { sLL $1 $> (unitOL $1) }
                           ; ams (sLL $1 $> $ unitOL (sLL $1 $> $ SigD (GenericSig l ty)))
                                 [mj AnnDefault $1,mj AnnDcolon $3] } }
 
-          -- A 'default' signature used with the generic-programming extension
-          | 'default' infixexp '::' sigtypedoc
-                    {% do { (TypeSig l ty _) <- checkValSig $2 $4
-                          ; ams (sLL $1 $> $ unitOL (sLL $1 $> $ SigD (GenericSig l ty)))
-                                [mj AnnDefault $1,mj AnnDcolon $3] } }
-
 decls_cls :: { Located (OrdList (LHsDecl RdrName)) }    -- Reversed
           : decls_cls ';' decl_cls      {% addAnnotation (oll (unLoc $1)) AnnSemi (gl $2)
                                            >> return (sLL $1 $> ((unLoc $1) `appOL`



More information about the ghc-commits mailing list