src/HOL/Quickcheck.thy
changeset 45729 a709e1a0f3dd
parent 45721 d1fb55c2ed65
child 45733 6bb30ae1abfe
equal deleted inserted replaced
45728:123e3a9a3bb3 45729:a709e1a0f3dd
    14 
    14 
    15 setup {* Code_Target.extend_target ("Quickcheck", (Code_Runtime.target, K I)) *}
    15 setup {* Code_Target.extend_target ("Quickcheck", (Code_Runtime.target, K I)) *}
    16 
    16 
    17 subsection {* Catching Match exceptions *}
    17 subsection {* Catching Match exceptions *}
    18 
    18 
    19 definition catch_match :: "(bool * term list) option => (bool * term list) option => (bool * term list) option"
    19 definition catch_match :: "'a => 'a => 'a" (* "(bool * term list) option => (bool * term list) option => (bool * term list) option"*)
    20 where
    20 where
    21   [code del]: "catch_match t1 t2 = (SOME t. t = t1 \<or> t = t2)"
    21   [code del]: "catch_match t1 t2 = (SOME t. t = t1 \<or> t = t2)"
    22 
    22 
    23 code_const catch_match 
    23 code_const catch_match 
    24   (Quickcheck "(_) handle Match => _")
    24   (Quickcheck "(_) handle Match => _")