equal
deleted
inserted
replaced
66 val the_thread_data: unit -> generic |
66 val the_thread_data: unit -> generic |
67 val set_thread_data: generic option -> unit |
67 val set_thread_data: generic option -> unit |
68 val setmp_thread_data: generic option -> ('a -> 'b) -> 'a -> 'b |
68 val setmp_thread_data: generic option -> ('a -> 'b) -> 'a -> 'b |
69 val >> : (theory -> theory) -> unit |
69 val >> : (theory -> theory) -> unit |
70 val >>> : (theory -> 'a * theory) -> 'a |
70 val >>> : (theory -> 'a * theory) -> 'a |
71 (*delayed setup*) |
|
72 val add_setup: (theory -> theory) -> unit |
|
73 val setup: unit -> theory -> theory |
|
74 end; |
71 end; |
75 |
72 |
76 signature PRIVATE_CONTEXT = |
73 signature PRIVATE_CONTEXT = |
77 sig |
74 sig |
78 include CONTEXT |
75 include CONTEXT |
535 nonfix >>; |
532 nonfix >>; |
536 fun >> f = >>> (fn thy => ((), f thy)); |
533 fun >> f = >>> (fn thy => ((), f thy)); |
537 |
534 |
538 val _ = set_thread_data (SOME (Theory pre_pure_thy)); |
535 val _ = set_thread_data (SOME (Theory pre_pure_thy)); |
539 |
536 |
540 |
|
541 |
|
542 (** delayed theory setup **) |
|
543 |
|
544 local |
|
545 val setup_fn = ref (I: theory -> theory); |
|
546 in |
|
547 fun add_setup f = CRITICAL (fn () => setup_fn := (! setup_fn #> f)); |
|
548 fun setup () = CRITICAL (fn () => let val f = ! setup_fn in setup_fn := I; f end); |
|
549 end; |
|
550 |
|
551 end; |
537 end; |
552 |
538 |
553 structure BasicContext: BASIC_CONTEXT = Context; |
539 structure BasicContext: BASIC_CONTEXT = Context; |
554 open BasicContext; |
540 open BasicContext; |
555 |
541 |