Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
f72e1bbd
Commit
f72e1bbd
authored
Apr 27, 1999
by
simonm
Browse files
[project @ 1999-04-27 15:50:07 by simonm]
unboxed 1-tuples are legal.
parent
6a61ff24
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/parser/hsparser.y
View file @
f72e1bbd
...
...
@@ -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); }
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment