From: simonm Date: Tue, 27 Apr 1999 15:50:07 +0000 (+0000) Subject: [project @ 1999-04-27 15:50:07 by simonm] X-Git-Tag: Approximately_9120_patches~6286 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f72e1bbd73b47c280d0097786c1599b79248b21d;p=ghc-hetmet.git [project @ 1999-04-27 15:50:07 by simonm] unboxed 1-tuples are legal. --- diff --git a/ghc/compiler/parser/hsparser.y b/ghc/compiler/parser/hsparser.y index 4e4b317..74473d2 100644 --- a/ghc/compiler/parser/hsparser.y +++ b/ghc/compiler/parser/hsparser.y @@ -1069,8 +1069,7 @@ aexp : qvar { $$ = mkident($1); } | OBRACK list_exps CBRACK { $$ = mkllist($2); } | OPAREN exp COMMA texps CPAREN { $$ = mktuple(mklcons($2,$4)); } /* unboxed tuples */ - | OUNBOXPAREN exp COMMA texps CUNBOXPAREN - { $$ = mkutuple(mklcons($2,$4)); } + | OUNBOXPAREN texps CUNBOXPAREN { $$ = mkutuple($2); } /* only in expressions ... */ | aexp OCURLY rbinds1 CCURLY { $$ = mkrupdate($1,$3); } @@ -1278,7 +1277,7 @@ apatc : qvar { $$ = mkident($1); } | lit_constant { $$ = mklit($1); } | OPAREN pat CPAREN { $$ = mkpar($2); } | OPAREN pat COMMA pats CPAREN { $$ = mktuple(mklcons($2,$4)); } - | OUNBOXPAREN pat COMMA pats CUNBOXPAREN { $$ = mkutuple(mklcons($2,$4)); } + | OUNBOXPAREN pats CUNBOXPAREN { $$ = mkutuple($2); } | OBRACK pats CBRACK { $$ = mkllist($2); } | LAZY apat { $$ = mklazyp($2); } ;