diff -r 6296915dee6e -r 5a53724fe247 src/Pure/ML_Bootstrap.thy --- a/src/Pure/ML_Bootstrap.thy Mon Aug 27 14:31:52 2018 +0200 +++ b/src/Pure/ML_Bootstrap.thy Mon Aug 27 14:42:24 2018 +0200 @@ -11,35 +11,37 @@ external_file "$POLYML_EXE" -subsection \Standard ML environment for virtual bootstrap\ +subsection \ML environment for virtual bootstrap\ -setup \Context.theory_map ML_Env.init_bootstrap\ - -SML_import \ +ML \ + #allStruct ML_Name_Space.global () |> List.app (fn (name, _) => + if member (op =) ML_Name_Space.hidden_structures name then + ML (Input.string ("structure " ^ name ^ " = " ^ name)) + else ()); structure Output_Primitives = Output_Primitives_Virtual; structure Thread_Data = Thread_Data_Virtual; + structure PolyML = PolyML; fun ML_system_pp (_: FixedInt.int -> 'a -> 'b -> PolyML_Pretty.pretty) = (); \ -subsection \Final setup of global ML environment\ +subsection \Global ML environment for Isabelle/Pure\ ML \Proofterm.proofs := 0\ -ML_export \ - List.app ML_Name_Space.forget_structure ML_Name_Space.hidden_structures; - structure PolyML = - struct - val pointerEq = pointer_eq; - structure IntInf = PolyML.IntInf; - end; +ML \ + Context.setmp_generic_context NONE + ML \ + List.app ML_Name_Space.forget_structure ML_Name_Space.hidden_structures; + structure PolyML = + struct + val pointerEq = pointer_eq; + structure IntInf = PolyML.IntInf; + end; + \ \ -ML \\<^assert> (not (can ML \open RunCall\))\ - - -subsection \Switch to bootstrap environment\ - -setup \Config.put_global ML_Env.SML_environment true\ +setup \Context.theory_map ML_Env.bootstrap_name_space\ +declare [[ML_read_global = false]] end