equal
deleted
inserted
replaced
227 fun make_bool_args' xs = |
227 fun make_bool_args' xs = |
228 make_bool_args (K HOLogic.false_const) (K HOLogic.true_const) xs; |
228 make_bool_args (K HOLogic.false_const) (K HOLogic.true_const) xs; |
229 |
229 |
230 fun arg_types_of k c = drop k (binder_types (fastype_of c)); |
230 fun arg_types_of k c = drop k (binder_types (fastype_of c)); |
231 |
231 |
232 fun find_arg T x [] = sys_error "find_arg" |
232 fun find_arg T x [] = raise Fail "find_arg" |
233 | find_arg T x ((p as (_, (SOME _, _))) :: ps) = |
233 | find_arg T x ((p as (_, (SOME _, _))) :: ps) = |
234 apsnd (cons p) (find_arg T x ps) |
234 apsnd (cons p) (find_arg T x ps) |
235 | find_arg T x ((p as (U, (NONE, y))) :: ps) = |
235 | find_arg T x ((p as (U, (NONE, y))) :: ps) = |
236 if (T: typ) = U then (y, (U, (SOME x, y)) :: ps) |
236 if (T: typ) = U then (y, (U, (SOME x, y)) :: ps) |
237 else apsnd (cons p) (find_arg T x ps); |
237 else apsnd (cons p) (find_arg T x ps); |