%type <ubinding> topdecl topdecls letdecls
typed datad newtd classd instd defaultd foreignd
- decl decls fixdecl fix_op fix_ops valdef
+ decl decls non_empty_decls fixdecl fix_op fix_ops valdef
maybe_where where_body type_and_maybe_id
%type <uttype> polytype
}
;
+non_empty_decls : decl
+ | non_empty_decls SEMI { $$ = $1; }
+ | non_empty_decls SEMI decl
+ {
+ if(SAMEFN)
+ {
+ extendfn($1,$3);
+ $$ = $1;
+ }
+ else
+ $$ = mkabind($1,$3);
+ }
+ ;
+
/*
Note: if there is an iclasop_pragma here, then we must be
doing a class-op in an interface -- unless the user is up
maybe_where: /* empty */ { $$ = mknullbind(); }
| WHERE where_body { $$ = $2; }
+ | WHERE { $$ = mknullbind(); }
;
where_body : ocurly decls ccurly { $$ = $2; }
- | vocurly decls vccurly { $$ = $2; }
+ | vocurly non_empty_decls vccurly { $$ = $2; }
;
gd : VBAR quals { $$ = $2; }