241 *} |
241 *} |
242 |
242 |
243 text %mlref {* |
243 text %mlref {* |
244 \begin{mldecls} |
244 \begin{mldecls} |
245 @{index_ML_type Proof.context} \\ |
245 @{index_ML_type Proof.context} \\ |
246 @{index_ML ProofContext.init: "theory -> Proof.context"} \\ |
246 @{index_ML ProofContext.init_global: "theory -> Proof.context"} \\ |
247 @{index_ML ProofContext.theory_of: "Proof.context -> theory"} \\ |
247 @{index_ML ProofContext.theory_of: "Proof.context -> theory"} \\ |
248 @{index_ML ProofContext.transfer: "theory -> Proof.context -> Proof.context"} \\ |
248 @{index_ML ProofContext.transfer: "theory -> Proof.context -> Proof.context"} \\ |
249 \end{mldecls} |
249 \end{mldecls} |
250 |
250 |
251 \begin{description} |
251 \begin{description} |
252 |
252 |
253 \item @{ML_type Proof.context} represents proof contexts. Elements |
253 \item @{ML_type Proof.context} represents proof contexts. Elements |
254 of this type are essentially pure values, with a sliding reference |
254 of this type are essentially pure values, with a sliding reference |
255 to the background theory. |
255 to the background theory. |
256 |
256 |
257 \item @{ML ProofContext.init}~@{text "thy"} produces a proof context |
257 \item @{ML ProofContext.init_global}~@{text "thy"} produces a proof context |
258 derived from @{text "thy"}, initializing all data. |
258 derived from @{text "thy"}, initializing all data. |
259 |
259 |
260 \item @{ML ProofContext.theory_of}~@{text "ctxt"} selects the |
260 \item @{ML ProofContext.theory_of}~@{text "ctxt"} selects the |
261 background theory from @{text "ctxt"}, dereferencing its internal |
261 background theory from @{text "ctxt"}, dereferencing its internal |
262 @{ML_type theory_ref}. |
262 @{ML_type theory_ref}. |
303 theory from the generic @{text "context"}, using @{ML |
303 theory from the generic @{text "context"}, using @{ML |
304 "ProofContext.theory_of"} as required. |
304 "ProofContext.theory_of"} as required. |
305 |
305 |
306 \item @{ML Context.proof_of}~@{text "context"} always produces a |
306 \item @{ML Context.proof_of}~@{text "context"} always produces a |
307 proof context from the generic @{text "context"}, using @{ML |
307 proof context from the generic @{text "context"}, using @{ML |
308 "ProofContext.init"} as required (note that this re-initializes the |
308 "ProofContext.init_global"} as required (note that this re-initializes the |
309 context data with each invocation). |
309 context data with each invocation). |
310 |
310 |
311 \end{description} |
311 \end{description} |
312 *} |
312 *} |
313 |
313 |