[project @ 2005-01-05 15:38:31 by simonpj]
authorsimonpj <unknown>
Wed, 5 Jan 2005 15:38:31 +0000 (15:38 +0000)
committersimonpj <unknown>
Wed, 5 Jan 2005 15:38:31 +0000 (15:38 +0000)
Allow trailing semicolon in GADT constructor list

ghc/compiler/parser/Parser.y.pp

index 8305022..c8a5825 100644 (file)
@@ -873,6 +873,7 @@ gadt_constrlist :: { Located [LConDecl RdrName] }
 
 gadt_constrs :: { Located [LConDecl RdrName] }
         : gadt_constrs ';' gadt_constr  { LL ($3 : unLoc $1) }
+        | gadt_constrs ';'             { $1 }
         | gadt_constr                   { L1 [$1] } 
 
 gadt_constr :: { LConDecl RdrName }