| author | wenzelm |
| Wed, 01 May 2024 20:26:20 +0200 | |
| changeset 80166 | 825f35bae74b |
| parent 78740 | 45ff003d337c |
| child 80853 | a34eca8caccb |
| 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 |
|
|
78740
45ff003d337c
discontinue obsolete "Interrupt" constructor (NB: catch-all pattern produces ML compiler error);
wenzelm
parents:
78650
diff
changeset
|
11 |
["isSome", "getOpt", "valOf", "foldl", "foldr", "print", "explode", "concat", "Interrupt"]; |
| 62818 | 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 |
||
| 62923 | 22 |
structure Basic_Exn: BASIC_EXN = Exn; |
23 |
open Basic_Exn; |
|
|
67206
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
24 |
|
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
25 |
structure String = |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
26 |
struct |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
27 |
open String; |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
28 |
fun substring (s, i, n) = |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
29 |
if n = 1 then String.str (String.sub (s, i)) |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
30 |
else String.substring (s, i, n); |
|
b8f30228a55b
minor performance tuning, notably for Library.fold_string etc.;
wenzelm
parents:
67205
diff
changeset
|
31 |
end; |
| 75594 | 32 |
|
33 |
structure Substring = |
|
34 |
struct |
|
35 |
open Substring; |
|
36 |
val empty = full ""; |
|
37 |
end; |