src/HOL/Tools/Quickcheck/quickcheck_common.ML
changeset 51126 df86080de4cb
parent 50046 0051dc4f301f
child 51143 0a2371e7ced3
equal deleted inserted replaced
51125:f90874d3a246 51126:df86080de4cb
   307 fun mk_safe_if genuine_only none (cond, then_t, else_t) genuine =
   307 fun mk_safe_if genuine_only none (cond, then_t, else_t) genuine =
   308   let
   308   let
   309     val T = fastype_of then_t
   309     val T = fastype_of then_t
   310     val if_t = Const (@{const_name "If"}, @{typ bool} --> T --> T --> T)
   310     val if_t = Const (@{const_name "If"}, @{typ bool} --> T --> T --> T)
   311   in
   311   in
   312     Const (@{const_name "Quickcheck.catch_match"}, T --> T --> T) $ 
   312     Const (@{const_name "Quickcheck_Random.catch_match"}, T --> T --> T) $ 
   313       (if_t $ cond $ then_t $ else_t genuine) $
   313       (if_t $ cond $ then_t $ else_t genuine) $
   314       (if_t $ genuine_only $ none $ else_t false)
   314       (if_t $ genuine_only $ none $ else_t false)
   315   end
   315   end
   316 
   316 
   317 fun collect_results f [] results = results
   317 fun collect_results f [] results = results