extern int startlineno;
extern int endlineno;
+/* Local helper functions */
+static void checkinpat PROTO((void));
+static void punningNowIllegal PROTO((void));
+
+
/**********************************************************************
* *
* *
| rbinds1 COMMA rbind { $$ = lapp($1,$3); }
;
-rbind : qvar EQUAL exp { $$ = mkrbind($1,mkjust($3)); }
-;
+rbind : qvar { punningNowIllegal(); }
+ | qvar EQUAL exp { $$ = mkrbind($1,mkjust($3)); }
+ ;
texps : exp { $$ = lsing($1); }
| exp COMMA texps { $$ = mklcons($1, $3) }
| rpats1 COMMA rpat { $$ = lapp($1,$3); }
;
-rpat : qvar EQUAL pat { $$ = mkrbind($1,mkjust($3)); }
+rpat : qvar { punningNowIllegal(); }
+ | qvar EQUAL pat { $$ = mkrbind($1,mkjust($3)); }
;
**********************************************************************/
-void
-checkinpat()
+static void checkinpat()
{
if(pat_check)
hsperror("pattern syntax used in expression");
}
+static void punningNowIllegal()
+{
+ hsperror("Haskell 98 does not support 'punning' on records");
+}
+
+
/* The parser calls "hsperror" when it sees a
`report this and die' error. It sets the stage
and calls "yyerror".
int checkfixity PROTO((char *));
void checksamefn PROTO((tree));
-void checkinpat PROTO((void));
void expORpat PROTO((int,tree));
/* the "int" arg says what we want; it is one of: */