handling function types more carefully than in e98a06145530
authorbulwahn
Mon, 13 Sep 2010 16:44:19 +0200
changeset 39312 968c33be5c96
parent 39311 2bd067f80b92
child 39313 41ce0b56d858
handling function types more carefully than in e98a06145530
src/HOL/Tools/Predicate_Compile/predicate_compile_aux.ML
--- a/src/HOL/Tools/Predicate_Compile/predicate_compile_aux.ML	Mon Sep 13 16:44:18 2010 +0200
+++ b/src/HOL/Tools/Predicate_Compile/predicate_compile_aux.ML	Mon Sep 13 16:44:19 2010 +0200
@@ -275,7 +275,7 @@
 
 fun ho_args_of_typ T ts =
   let
-    fun ho_arg (Type("fun", [_,_])) (SOME t) = [t]
+    fun ho_arg (T as Type("fun", [_,_])) (SOME t) = if body_type T = @{typ bool} then [t] else []
       | ho_arg (Type("fun", [_,_])) NONE = raise Fail "mode and term do not match"
       | ho_arg (Type(@{type_name "Product_Type.prod"}, [T1, T2]))
          (SOME (Const (@{const_name Pair}, _) $ t1 $ t2)) =
@@ -289,7 +289,7 @@
 
 fun ho_argsT_of_typ Ts =
   let
-    fun ho_arg (T as Type("fun", [_,_])) = [T]
+    fun ho_arg (T as Type("fun", [_,_])) = if body_type T = @{typ bool} then [T] else []
       | ho_arg (Type(@{type_name "Product_Type.prod"}, [T1, T2])) =
           ho_arg T1 @ ho_arg T2
       | ho_arg _ = []