src/Pure/PIDE/markup_expression.ML
changeset 80912 b2eaa342aae5
parent 80902 ac1e8686e523
child 80915 dbaa780c6d0d
equal deleted inserted replaced
80911:8ad5e6df050b 80912:b2eaa342aae5
     8 sig
     8 sig
     9   val check_kind: Proof.context -> xstring * Position.T -> string
     9   val check_kind: Proof.context -> xstring * Position.T -> string
    10   val setup_kind: binding -> theory -> string * theory
    10   val setup_kind: binding -> theory -> string * theory
    11   val check: Proof.context -> xstring * Position.T -> Markup.T
    11   val check: Proof.context -> xstring * Position.T -> Markup.T
    12   val setup: binding -> Markup.T
    12   val setup: binding -> Markup.T
       
    13   val markup_type: Markup.T
       
    14   val markup_type_application: Markup.T
       
    15   val markup_term: Markup.T
       
    16   val markup_term_application: Markup.T
       
    17   val markup_prop: Markup.T
       
    18   val markup_prop_application: Markup.T
    13 end;
    19 end;
    14 
    20 
    15 structure Markup_Expression: MARKUP_EXPRESSION =
    21 structure Markup_Expression: MARKUP_EXPRESSION =
    16 struct
    22 struct
    17 
    23 
    42 fun check ctxt = check_kind ctxt #> Markup.expression;
    48 fun check ctxt = check_kind ctxt #> Markup.expression;
    43 
    49 
    44 fun setup binding =
    50 fun setup binding =
    45   Context.>>> (Context.map_theory_result (setup_kind binding #>> Markup.expression));
    51   Context.>>> (Context.map_theory_result (setup_kind binding #>> Markup.expression));
    46 
    52 
       
    53 
       
    54 (* concrete markup *)
       
    55 
       
    56 val markup_type = setup (Binding.make ("type", \<^here>));
       
    57 val markup_type_application = setup (Binding.make ("type_application", \<^here>));
       
    58 
       
    59 val markup_term = setup (Binding.make ("term", \<^here>));
       
    60 val markup_term_application = setup (Binding.make ("term_application", \<^here>));
       
    61 
       
    62 val markup_prop = setup (Binding.make ("prop", \<^here>));
       
    63 val markup_prop_application = setup (Binding.make ("prop_application", \<^here>));
       
    64 
    47 end;
    65 end;