[commit: ghc] master: Fix parsing export lists (891857a)

Ian Lynagh igloo at earth.li
Sun May 19 19:32:50 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/891857a30f9c899d33d137605b41d2698353c610

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

commit 891857a30f9c899d33d137605b41d2698353c610
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun May 19 13:36:14 2013 +0100

    Fix parsing export lists
    
    We were accepting
        module ExportCommaComma (id, reverse,,) where
    where only 1 trailing comma should be permitted.

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

 compiler/parser/Parser.y.pp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 18651b9..34c0bc6 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -469,7 +469,7 @@ exportlist :: { [LIE RdrName] }
         | exportlist1                           { $1 }
 
 exportlist1 :: { [LIE RdrName] }
-        : expdoclist export expdoclist ',' exportlist  { $1 ++ ($2 : $3) ++ $5 }
+        : expdoclist export expdoclist ',' exportlist1 { $1 ++ ($2 : $3) ++ $5 }
         | expdoclist export expdoclist                 { $1 ++ ($2 : $3) }
         | expdoclist                                   { $1 }
 





More information about the ghc-commits mailing list