src/Pure/Isar/toplevel.ML
changeset 18641 688056d430b0
parent 18592 451d622bb4a9
child 18664 ad7ae7870427
equal deleted inserted replaced
18640:61627ae3ddc3 18641:688056d430b0
    19   exception UNDEF
    19   exception UNDEF
    20   val assert: bool -> unit
    20   val assert: bool -> unit
    21   val node_history_of: state -> node History.T
    21   val node_history_of: state -> node History.T
    22   val node_of: state -> node
    22   val node_of: state -> node
    23   val node_case: (theory -> 'a) -> (Proof.state -> 'a) -> state -> 'a
    23   val node_case: (theory -> 'a) -> (Proof.state -> 'a) -> state -> 'a
       
    24   val context_of: state -> Context.generic
    24   val theory_of: state -> theory
    25   val theory_of: state -> theory
    25   val sign_of: state -> theory    (*obsolete*)
    26   val sign_of: state -> theory    (*obsolete*)
    26   val body_context_of: state -> Proof.context
    27   val body_context_of: state -> Proof.context
    27   val proof_of: state -> Proof.state
    28   val proof_of: state -> Proof.state
    28   val proof_position_of: state -> int
    29   val proof_position_of: state -> int
   161   (case node_of state of
   162   (case node_of state of
   162     Theory (thy, _) => f thy
   163     Theory (thy, _) => f thy
   163   | Proof (prf, _) => g (ProofHistory.current prf)
   164   | Proof (prf, _) => g (ProofHistory.current prf)
   164   | SkipProof ((_, thy), _) => f thy);
   165   | SkipProof ((_, thy), _) => f thy);
   165 
   166 
       
   167 val context_of = node_case Context.Theory (Context.Proof o Proof.context_of);
   166 val theory_of = node_case I Proof.theory_of;
   168 val theory_of = node_case I Proof.theory_of;
   167 val sign_of = theory_of;
   169 val sign_of = theory_of;
   168 
   170 
   169 fun body_context_of state =
   171 fun body_context_of state =
   170   (case node_of state of
   172   (case node_of state of