author | haftmann |
Thu, 06 Oct 2022 14:16:39 +0000 | |
changeset 76251 | fbde7d1211fc |
parent 62941 | 5612ec9f0f49 |
permissions | -rw-r--r-- |
62910
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
1 |
(* Title: Pure/ML/ml_recursive.ML |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
3 |
|
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
4 |
ML name space for recursive compiler invocation. |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
5 |
*) |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
6 |
|
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
7 |
signature ML_RECURSIVE = |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
8 |
sig |
62941 | 9 |
type env = |
10 |
{debug: bool, |
|
11 |
name_space: PolyML.NameSpace.nameSpace, |
|
12 |
add_breakpoints: (int * (bool ref * Thread_Position.T)) list -> unit}; |
|
13 |
val get: unit -> env option |
|
14 |
val recursive: env -> (unit -> 'a) -> 'a |
|
62910
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
15 |
end; |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
16 |
|
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
17 |
structure ML_Recursive: ML_RECURSIVE = |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
18 |
struct |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
19 |
|
62941 | 20 |
type env = |
21 |
{debug: bool, |
|
22 |
name_space: PolyML.NameSpace.nameSpace, |
|
23 |
add_breakpoints: (int * (bool ref * Thread_Position.T)) list -> unit}; |
|
24 |
||
25 |
val var = Thread_Data.var () : env Thread_Data.var; |
|
62910
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
26 |
|
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
27 |
fun get () = Thread_Data.get var; |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
28 |
fun recursive space e = Thread_Data.setmp var (SOME space) e (); |
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
29 |
|
f37878ebba65
explicit handling of recursive ML name space, e.g. relevant for ML_Bootstrap;
wenzelm
parents:
diff
changeset
|
30 |
end; |