avoid exception Option: only apply "the" if needed
authorboehmes
Sun, 04 Oct 2009 11:45:41 +0200
changeset 32868 5f1805c6ef2a
parent 32867 6eafaa92a95e
child 32869 159309603edc
avoid exception Option: only apply "the" if needed
src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML
--- a/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Sun Oct 04 07:01:22 2009 +0200
+++ b/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Sun Oct 04 11:45:41 2009 +0200
@@ -299,7 +299,8 @@
 fun run_sh prover hard_timeout timeout dir st =
   let
     val (ctxt, goal) = Proof.get_goal st
-    val ctxt' = ctxt |> is_some dir ? Config.put AtpWrapper.destdir (the dir)
+    val ctxt' = if is_none dir then ctxt
+      else Config.put AtpWrapper.destdir (the dir) ctxt
     val atp = prover (AtpWrapper.atp_problem_of_goal
       (AtpManager.get_full_types ()) 1 (ctxt', goal))