proper checks -- the calls data structure may contain spurious entries
authorblanchet
Tue, 09 Sep 2014 23:54:39 +0200
changeset 58290 14e186d2dd3a
parent 58289 eb93bc67d361
child 58291 81a5f05130c1
proper checks -- the calls data structure may contain spurious entries
src/HOL/Tools/BNF/bnf_fp_n2m_sugar.ML
--- a/src/HOL/Tools/BNF/bnf_fp_n2m_sugar.ML	Tue Sep 09 22:33:43 2014 +0200
+++ b/src/HOL/Tools/BNF/bnf_fp_n2m_sugar.ML	Tue Sep 09 23:54:39 2014 +0200
@@ -180,8 +180,10 @@
         if T = fpT andalso kk' <> kk then
           mutual_self_call (nth callers kk)
             (the (find_first (not o null o get_indices callers) calls))
+        else if T = nth fpTs kk' then
+          nth Xs kk'
         else
-          nth Xs kk'
+          freeze_fpTs_type_based_default T
       | _ => incompatible_calls calls);
 
     fun freeze_fpTs_map kk (fpT as Type (_, Ts')) (callss, (live_call :: _, dead_calls))