src/Tools/Code/code_ml.ML
changeset 67207 ad538f6c5d2f
parent 66326 9eb8a2d07852
child 68028 1f9f973eed2a
equal deleted inserted replaced
67206:b8f30228a55b 67207:ad538f6c5d2f
   870     print_typ (INFX (1, R)) ty2
   870     print_typ (INFX (1, R)) ty2
   871   );
   871   );
   872 
   872 
   873 val _ = Theory.setup
   873 val _ = Theory.setup
   874   (Code_Target.add_language
   874   (Code_Target.add_language
   875     (target_SML, { serializer = serializer_sml, literals = literals_sml,
   875     (target_SML, {serializer = serializer_sml, literals = literals_sml,
   876       check = { env_var = "",
   876       check = {env_var = "",
   877         make_destination = fn p => Path.append p (Path.explode "ROOT.ML"),
   877         make_destination = fn p => Path.append p (Path.explode "ROOT.ML"),
   878         make_command = fn _ =>
   878         make_command = fn _ =>
   879           "isabelle process -e 'datatype ref = datatype Unsynchronized.ref' -f 'ROOT.ML' -l Pure" } })
   879           "isabelle process -e 'datatype ref = datatype Unsynchronized.ref' -f 'ROOT.ML' -l Pure"},
       
   880       evaluation_args = []})
   880   #> Code_Target.add_language
   881   #> Code_Target.add_language
   881     (target_OCaml, { serializer = serializer_ocaml, literals = literals_ocaml,
   882     (target_OCaml, {serializer = serializer_ocaml, literals = literals_ocaml,
   882       check = { env_var = "ISABELLE_OCAML",
   883       check = {env_var = "ISABELLE_OCAML",
   883         make_destination = fn p => Path.append p (Path.explode "ROOT.ocaml"),
   884         make_destination = fn p => Path.append p (Path.explode "ROOT.ocaml"),
   884         make_command = fn _ => "\"$ISABELLE_OCAML\" -w pu nums.cma ROOT.ocaml" } })
   885         make_command = fn _ => "\"$ISABELLE_OCAML\" -w pu nums.cma ROOT.ocaml"},
       
   886       evaluation_args = []})
   885   #> Code_Target.set_printings (Type_Constructor ("fun",
   887   #> Code_Target.set_printings (Type_Constructor ("fun",
   886     [(target_SML, SOME (2, fun_syntax)), (target_OCaml, SOME (2, fun_syntax))]))
   888     [(target_SML, SOME (2, fun_syntax)), (target_OCaml, SOME (2, fun_syntax))]))
   887   #> fold (Code_Target.add_reserved target_SML) ML_Syntax.reserved_names
   889   #> fold (Code_Target.add_reserved target_SML) ML_Syntax.reserved_names
   888   #> fold (Code_Target.add_reserved target_SML)
   890   #> fold (Code_Target.add_reserved target_SML)
   889       ["ref" (*rebinding is illegal*), "o" (*dictionary projections use it already*),
   891       ["ref" (*rebinding is illegal*), "o" (*dictionary projections use it already*),