changeset 415 | f1be8028a4a9 |
414:05e5d68c9627 | 415:f1be8028a4a9 |
---|---|
1 theory Ex2 |
|
2 imports Main |
|
3 begin |
|
4 |
|
5 section {* Proof context data *} |
|
6 |
|
7 ML {* |
|
8 structure My_Data = ProofDataFun(type T = int * string fun init _ = (2, "foo")) |
|
9 *} |
|
10 |
|
11 ML {* My_Data.get @{context} *} |
|
12 |
|
13 ML {* val ctxt0 = @{context} *} |
|
14 ML {* val ctxt1 = ctxt0 |> My_Data.map (fn (i, s) => (i + 1, s ^ "o")) *} |
|
15 ML {* val ctxt2 = ctxt1 |> My_Data.map (fn (i, s) => (i + 1, s ^ "o")) *} |
|
16 |
|
17 ML {* My_Data.get ctxt2 *} |
|
18 |
|
19 end |