| author | wenzelm | 
| Thu, 10 Nov 2022 11:20:37 +0100 | |
| changeset 76503 | 5944f9e70d98 | 
| parent 75594 | 303f885d4a8c | 
| child 78650 | 47d0c333d155 | 
| 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; | 
| 75594 | 36 | |
| 37 | structure Substring = | |
| 38 | struct | |
| 39 | open Substring; | |
| 40 | val empty = full ""; | |
| 41 | end; |