equal
deleted
inserted
replaced
64 val quickcheck_generator_cmd = gen_quickcheck_generator |
64 val quickcheck_generator_cmd = gen_quickcheck_generator |
65 (fn ctxt => fst o dest_Type o Proof_Context.read_type_name_proper ctxt false) Syntax.read_term |
65 (fn ctxt => fst o dest_Type o Proof_Context.read_type_name_proper ctxt false) Syntax.read_term |
66 |
66 |
67 val _ = Outer_Syntax.command "quickcheck_generator" "define quickcheck generators for abstract types" |
67 val _ = Outer_Syntax.command "quickcheck_generator" "define quickcheck generators for abstract types" |
68 Keyword.thy_decl ((Parse.type_const -- |
68 Keyword.thy_decl ((Parse.type_const -- |
69 Scan.option (Args.$$$ "predicate" |-- Parse.$$$ ":" |-- Parse.term)) -- |
69 Scan.option (Args.$$$ "predicate" |-- @{keyword ":"} |-- Parse.term)) -- |
70 (Args.$$$ "constructors" |-- Parse.$$$ ":" |-- Parse.list1 Parse.term) |
70 (Args.$$$ "constructors" |-- @{keyword ":"} |-- Parse.list1 Parse.term) |
71 >> (fn ((tyco, opt_pred), constrs) => |
71 >> (fn ((tyco, opt_pred), constrs) => |
72 Toplevel.theory (quickcheck_generator_cmd tyco opt_pred constrs))) |
72 Toplevel.theory (quickcheck_generator_cmd tyco opt_pred constrs))) |
73 |
73 |
74 end; |
74 end; |