Skip to content

Commit 2351fb9

Browse files
committed
Clamp var types in fast compose path
1 parent d374a16 commit 2351fb9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Tools/mrbnf_sugar.ML

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ fun create_binder_datatype (spec : spec) lthy =
11031103
])),
11041104
REPEAT_DETERM o resolve_tac ctxt prems,
11051105
REPEAT_DETERM o EVERY' [
1106-
EqSubst.eqsubst_tac ctxt [0] (@{print}(map #map_permute nesting_binder_sugars)),
1106+
EqSubst.eqsubst_tac ctxt [0] (map #map_permute nesting_binder_sugars),
11071107
REPEAT_DETERM o resolve_tac ctxt prems
11081108
],
11091109
K (Local_Defs.unfold0_tac ctxt @{thms id_apply}),

Tools/mrsbnf_comp.ML

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,9 @@ fun mrsbnf_of_typ _ _ qualify Ds0 var_types _ (T as TFree T') (accum:((MRSBNF_De
521521

522522
val var_types = map (AList.lookup (op=) var_types o dest_TFree) Ts';
523523
val var_types = @{map 3} (fn req => fn var_type => fn T => if member (op=) Ds0 (dest_TFree T) then
524-
MRBNF_Def.Dead_Var else the_default var_type req
524+
MRBNF_Def.Dead_Var else
525+
let val x = the_default var_type req;
526+
in if MRBNF_Def.var_type_ord (x, var_type) = LESS then x else var_type end
525527
) var_types (MRBNF_Def.var_types_of_mrbnf mrbnf) Ts';
526528

527529
val (mrsbnf, accum) = if MRBNF_Def.var_types_of_mrbnf mrbnf = var_types then

0 commit comments

Comments
 (0)