| author | haftmann | 
| Wed, 05 Feb 2020 20:17:00 +0000 | |
| changeset 71420 | 572ab9e64e18 | 
| parent 68918 | 3a0db30e5d87 | 
| child 72113 | 2d9e40cfe9af | 
| permissions | -rw-r--r-- | 
| 67205 | 1 | (* Title: Pure/ML/ml_init.ML | 
| 62818 | 2 | Author: Makarius | 
| 3 | ||
| 67205 | 4 | Initial ML environment. | 
| 62818 | 5 | *) | 
| 6 | ||
| 7 | val seconds = Time.fromReal; | |
| 8 | ||
| 9 | val _ = | |
| 10 | List.app ML_Name_Space.forget_val | |
| 11 | ["isSome", "getOpt", "valOf", "foldl", "foldr", "print", "explode", "concat"]; | |
| 12 | ||
| 13 | val ord = SML90.ord; | |
| 14 | val chr = SML90.chr; | |
| 15 | val raw_explode = SML90.explode; | |
| 63925 | 16 | val implode = String.concat; | 
| 62818 | 17 | |
| 18 | val pointer_eq = PolyML.pointerEq; | |
| 19 | ||
| 20 | val error_depth = PolyML.error_depth; | |
| 21 | ||
| 22 | open Thread; | |
| 62923 | 23 | |
| 24 | datatype illegal = Interrupt; | |
| 25 | ||
| 26 | structure Basic_Exn: BASIC_EXN = Exn; | |
| 27 | open Basic_Exn; | |
| 67206 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 28 | |
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 29 | structure String = | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 30 | struct | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 31 | open String; | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 32 | fun substring (s, i, n) = | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 33 | if n = 1 then String.str (String.sub (s, i)) | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 34 | else String.substring (s, i, n); | 
| 
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
 wenzelm parents: 
67205diff
changeset | 35 | end; |