[commit: ghc] master: Fix parsing regression in CTYPE patch (ef796d1)
Ian Lynagh
igloo at earth.li
Thu Feb 16 21:56:30 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/ef796d1b58f1cfa8867c7b14bd78e2d770d092a3
>---------------------------------------------------------------
commit ef796d1b58f1cfa8867c7b14bd78e2d770d092a3
Author: Ian Lynagh <igloo at earth.li>
Date: Thu Feb 16 19:31:06 2012 +0000
Fix parsing regression in CTYPE patch
>---------------------------------------------------------------
compiler/parser/Parser.y.pp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index f590f1c..f29364a 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -682,10 +682,13 @@ inst_decl :: { LInstDecl RdrName }
--
at_decl_cls :: { LTyClDecl RdrName }
-- type family declarations
- : 'type' type opt_kind_sig
+ : 'type' capi_ctype type opt_kind_sig
-- Note the use of type for the head; this allows
- -- infix type constructors to be declared
- {% mkTyFamily (comb3 $1 $2 $3) TypeFamily $2 (unLoc $3) }
+ -- infix type constructors to be declared.
+ -- Note that we ignore the capi_ctype for now, but
+ -- we need it in the grammar or we get loads of
+ -- extra shift/reduce conflicts and parsing goes wrong.
+ {% mkTyFamily (comb3 $1 $3 $4) TypeFamily $3 (unLoc $4) }
-- default type instance
| 'type' capi_ctype type '=' ctype
More information about the Cvs-ghc
mailing list