@@ -492,9 +492,9 @@ limits :
492492typeuse :
493493 | LPAR TYPE idx RPAR { fun c -> $3 c type_ }
494494
495- heaptypeuse :
496- | LPAR EXACT typeuse RPAR { fun c -> UseHT (Exact, Idx ( $3 c).it ) }
497- | typeuse { fun c -> UseHT (Inexact, Idx ( $1 c).it ) }
495+ exacttypeuse :
496+ | LPAR EXACT typeuse RPAR { fun c -> (Exact, $3 c) }
497+ | typeuse { fun c -> (Inexact, $1 c) }
498498
499499/* Immediates */
500500
@@ -998,20 +998,17 @@ func_fields :
998998 let y = inline_functype c' (fst $ 1 c') loc in
999999 let Func (_, ls, es) = snd $ 1 c' in
10001000 [Func (y, ls, es) @@ loc], [] , [] }
1001- | inline_import heaptypeuse func_fields_import /* Sugar */
1001+ | inline_import exacttypeuse func_fields_import /* Sugar */
10021002 { fun c x loc ->
1003- let exact, y = match ($ 2 c) with
1004- | UseHT (exact , Idx y ) -> exact, y
1005- | _ -> assert false
1006- in
1007- let y = inline_functype_explicit c (y @@ loc) ($ 3 c) in
1003+ let exact, y = $ 2 c in
1004+ let y = inline_functype_explicit c y ($ 3 c) in
10081005 [] ,
1009- [Import (fst $ 1 , snd $ 1 , ExternFuncT (UseHT ( exact, Idx y.it) )) @@ loc ], [] }
1006+ [Import (fst $ 1 , snd $ 1 , ExternFuncT (exact, Idx y.it)) @@ loc ], [] }
10101007 | inline_import func_fields_import /* Sugar */
10111008 { fun c x loc ->
10121009 let y = inline_functype c ($ 2 c) loc in
10131010 [] ,
1014- [Import (fst $ 1 , snd $ 1 , ExternFuncT (UseHT ( Inexact , Idx y.it) )) @@ loc ], [] }
1011+ [Import (fst $ 1 , snd $ 1 , ExternFuncT (Inexact , Idx y.it)) @@ loc ], [] }
10151012 | inline_export func_fields /* Sugar */
10161013 { fun c x loc ->
10171014 let fns, ims, exs = $ 2 c x loc in fns, ims, $ 1 (FuncX x) c :: exs }
@@ -1253,9 +1250,9 @@ table_fields :
12531250/* Imports & Exports */
12541251
12551252externtype :
1256- | LPAR FUNC bindidx_opt heaptypeuse RPAR
1253+ | LPAR FUNC bindidx_opt exacttypeuse RPAR
12571254 { fun c -> ignore ($ 3 c anon_func bind_func);
1258- fun () -> ExternFuncT ( $ 4 c) }
1255+ fun () -> let exact, y = $ 4 c in ExternFuncT (exact, Idx y.it ) }
12591256 | LPAR TAG bindidx_opt typeuse RPAR
12601257 { fun c -> ignore ($ 3 c anon_tag bind_tag);
12611258 fun () -> ExternTagT (TagT (Idx ($ 4 c).it)) }
@@ -1276,7 +1273,7 @@ externtype :
12761273 fun () ->
12771274 let exact, ft = $ 4 c in
12781275 let y = inline_functype c ft $ loc($ 4 ) in
1279- ExternFuncT (UseHT ( exact, Idx y.it) ) }
1276+ ExternFuncT (exact, Idx y.it) }
12801277
12811278import :
12821279 | LPAR IMPORT name name externtype RPAR
0 commit comments