Fix type error when where blockfun types eat regions

This commit is contained in:
John David Pressman 2019-10-18 17:46:20 -07:00
parent 2bffba379d
commit 6e0173a9a7
3 changed files with 8 additions and 6 deletions

View File

@ -212,8 +212,8 @@ and type_tuple = (type_expr, comma) nsepseq par reg
(* Function and procedure declarations *)
and fun_decl =
BlockFun of block_fun reg
| BlocklessFun of blockless_fun reg
BlockFun of block_fun
| BlocklessFun of blockless_fun
and block_fun = {
kwd_function : kwd_function;

View File

@ -203,8 +203,8 @@ and type_tuple = (type_expr, comma) nsepseq par reg
(* Function declarations *)
and fun_decl =
BlockFun of block_fun reg
| BlocklessFun of blockless_fun reg
BlockFun of block_fun
| BlocklessFun of blockless_fun
and block_fun = {
kwd_function : kwd_function;

View File

@ -263,7 +263,8 @@ fun_decl:
kwd_with = $9;
return = $10;
terminator = $11}
in BlockFun {region; value}}
in {region = region;
value = BlockFun value} }
| Function fun_name parameters COLON type_expr Is
Expr expr option(SEMI) {
let stop =
@ -282,7 +283,8 @@ fun_decl:
return = $8;
terminator = $9;
}
in BlocklessFun {region; value}}
in {region = region;
value = BlocklessFun value} }
parameters:
par(nsepseq(param_decl,SEMI)) { $1 }