src/HOL/Tools/Nitpick/nitpick_isar.ML
changeset 35280 54ab4921f826
parent 34982 7b8c366e34a2
child 35665 ff2bf50505ab
equal deleted inserted replaced
35279:4f6760122b2a 35280:54ab4921f826
   167   (case s of
   167   (case s of
   168      "smart" => if option then NONE else raise Option
   168      "smart" => if option then NONE else raise Option
   169    | "false" => SOME false
   169    | "false" => SOME false
   170    | "true" => SOME true
   170    | "true" => SOME true
   171    | "" => SOME true
   171    | "" => SOME true
   172    | s => raise Option)
   172    | _ => raise Option)
   173   handle Option.Option =>
   173   handle Option.Option =>
   174          let val ss = map quote ((option ? cons "smart") ["true", "false"]) in
   174          let val ss = map quote ((option ? cons "smart") ["true", "false"]) in
   175            error ("Parameter " ^ quote name ^ " must be assigned " ^
   175            error ("Parameter " ^ quote name ^ " must be assigned " ^
   176                   space_implode " " (serial_commas "or" ss) ^ ".")
   176                   space_implode " " (serial_commas "or" ss) ^ ".")
   177          end
   177          end
   431 (* raw_param list -> bool -> int -> int -> Proof.state -> bool * Proof.state *)
   431 (* raw_param list -> bool -> int -> int -> Proof.state -> bool * Proof.state *)
   432 fun pick_nits override_params auto i step state =
   432 fun pick_nits override_params auto i step state =
   433   let
   433   let
   434     val thy = Proof.theory_of state
   434     val thy = Proof.theory_of state
   435     val ctxt = Proof.context_of state
   435     val ctxt = Proof.context_of state
   436     val thm = #goal (Proof.raw_goal state)
       
   437     val _ = List.app check_raw_param override_params
   436     val _ = List.app check_raw_param override_params
   438     val params as {blocking, debug, ...} =
   437     val params as {blocking, debug, ...} =
   439       extract_params ctxt auto (default_raw_params thy) override_params
   438       extract_params ctxt auto (default_raw_params thy) override_params
   440     (* unit -> bool * Proof.state *)
   439     (* unit -> bool * Proof.state *)
   441     fun go () =
   440     fun go () =