Skip to content

Commit ffe7f49

Browse files
committed
Fix to not allow anonymous declarations
1 parent 351e1a5 commit ffe7f49

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

parser.mly

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,16 @@ typlist :
176176
;
177177

178178
atdec :
179-
| head typparamlist COLON typ
179+
| name typparamlist COLON typ
180180
{ VarD($1, funT($2, $4, Pure@@ati 2)@@span[ati 2; ati 4])@@at() }
181-
| TYPE head typparamlist
181+
| TYPE name typparamlist
182182
{ VarD($2, funT($3, TypT@@ati 1, Pure@@ati 3)@@at())@@at() }
183-
| head typparamlist EQUAL exp
183+
| name typparamlist EQUAL exp
184184
{ VarD($1, funT($2, EqT($4)@@ati 4, Pure@@ati 3)@@span[ati 2; ati 4])
185185
@@at() }
186186
| name
187187
{ VarD($1, funT([], EqT(VarE($1)@@ati 1)@@ati 1, Pure@@ati 1)@@ati 1)@@at() }
188-
| TYPE head typparamlist EQUAL typ
188+
| TYPE name typparamlist EQUAL typ
189189
{ VarD($2, funT($3, EqT(TypE($5)@@ati 5)@@ati 5, Pure@@ati 4)@@at())
190190
@@at() }
191191
| ELLIPSIS typ

0 commit comments

Comments
 (0)