src/Pure/System/ml_process.scala
changeset 62556 c115e69f457f
parent 62548 f8ebb715e06d
child 62557 a4ea3a222e0e
--- a/src/Pure/System/ml_process.scala	Tue Mar 08 11:18:21 2016 +0100
+++ b/src/Pure/System/ml_process.scala	Tue Mar 08 14:44:11 2016 +0100
@@ -12,9 +12,9 @@
   def apply(options: Options,
     heap: String = "",
     args: List[String] = Nil,
-    process_socket: String = "",
+    modes: List[String] = Nil,
     secure: Boolean = false,
-    modes: List[String] = Nil): Bash.Process =
+    process_socket: String = ""): Bash.Process =
   {
     val load_heaps =
     {
@@ -55,19 +55,18 @@
       }
       else Nil
 
-    val eval_secure = if (secure) List("Secure.set_secure ()") else Nil
-
     val eval_modes =
       if (modes.isEmpty) Nil
       else List("Print_Mode.add_modes " + ML_Syntax.print_list(ML_Syntax.print_string_raw _)(modes))
 
-
     // options
     val isabelle_process_options = Isabelle_System.tmp_file("options")
     File.write(isabelle_process_options, YXML.string_of_body(options.encode))
     val env = Map("ISABELLE_PROCESS_OPTIONS" -> File.standard_path(isabelle_process_options))
     val eval_options = if (load_heaps.isEmpty) Nil else List("Options.load_default ()")
 
+    val eval_secure = if (secure) List("Secure.set_secure ()") else Nil
+
     val eval_process =
       if (process_socket == "") Nil
       else List("Isabelle_Process.init " + ML_Syntax.print_string_raw(process_socket))
@@ -75,7 +74,7 @@
     // bash
     val bash_args =
       Word.explode(Isabelle_System.getenv("ML_OPTIONS")) :::
-      (eval_heaps ::: eval_exit ::: eval_secure ::: eval_modes ::: eval_options ::: eval_process).
+      (eval_heaps ::: eval_exit ::: eval_modes ::: eval_options ::: eval_secure ::: eval_process).
         map(eval => List("--eval", eval)).flatten ::: args
 
     Bash.process(env = env, script =