src/Pure/Thy/term_style.ML
changeset 50592 a39250169636
parent 43277 1fd31f859fc7
child 50637 81d6fe75ea5b
     1.1 --- a/src/Pure/Thy/term_style.ML	Tue Dec 18 02:19:14 2012 +0100
     1.2 +++ b/src/Pure/Thy/term_style.ML	Tue Dec 18 21:59:44 2012 +0100
     1.3 @@ -8,7 +8,6 @@
     1.4  sig
     1.5    val setup: string -> (Proof.context -> term -> term) parser -> theory -> theory
     1.6    val parse: (term -> term) context_parser
     1.7 -  val parse_bare: (term -> term) context_parser
     1.8  end;
     1.9  
    1.10  structure Term_Style: TERM_STYLE =
    1.11 @@ -53,12 +52,6 @@
    1.12        >> fold I
    1.13    || Scan.succeed I));
    1.14  
    1.15 -val parse_bare = Args.context :|-- (fn ctxt => (legacy_feature "Old-style antiquotation style.";
    1.16 -  Scan.lift Args.liberal_name
    1.17 -  >> (fn name => fst (Args.context_syntax "style"
    1.18 -       (Scan.lift (the_style (Proof_Context.theory_of ctxt) name))
    1.19 -          (Args.src (("style", []), Position.none)) ctxt |>> (fn f => f ctxt)))));
    1.20 -
    1.21  
    1.22  (* predefined styles *)
    1.23  
    1.24 @@ -81,19 +74,6 @@
    1.25        " in propositon: " ^ Syntax.string_of_term ctxt t)
    1.26    end);
    1.27  
    1.28 -fun style_parm_premise i = Scan.succeed (fn ctxt => fn t =>
    1.29 -  let
    1.30 -    val i_str = string_of_int i;
    1.31 -    val _ = legacy_feature (quote ("prem" ^ i_str)
    1.32 -      ^ " term style encountered; use explicit argument syntax "
    1.33 -      ^ quote ("prem " ^ i_str) ^ " instead.");
    1.34 -    val prems = Logic.strip_imp_prems t;
    1.35 -  in
    1.36 -    if i <= length prems then nth prems (i - 1)
    1.37 -    else error ("Not enough premises for prem" ^ i_str ^
    1.38 -      " in propositon: " ^ Syntax.string_of_term ctxt t)
    1.39 -  end);
    1.40 -
    1.41  fun isub_symbols (d :: s :: ss) =
    1.42        if Symbol.is_ascii_digit d andalso not (String.isPrefix ("\\<^") s)
    1.43        then d :: "\\<^isub>" :: isub_symbols (s :: ss)
    1.44 @@ -115,25 +95,6 @@
    1.45    setup "rhs" (style_lhs_rhs snd) #>
    1.46    setup "prem" style_prem #>
    1.47    setup "concl" (Scan.succeed (K Logic.strip_imp_concl)) #>
    1.48 -  setup "isub" (Scan.succeed (K isub_term)) #>
    1.49 -  setup "prem1" (style_parm_premise 1) #>
    1.50 -  setup "prem2" (style_parm_premise 2) #>
    1.51 -  setup "prem3" (style_parm_premise 3) #>
    1.52 -  setup "prem4" (style_parm_premise 4) #>
    1.53 -  setup "prem5" (style_parm_premise 5) #>
    1.54 -  setup "prem6" (style_parm_premise 6) #>
    1.55 -  setup "prem7" (style_parm_premise 7) #>
    1.56 -  setup "prem8" (style_parm_premise 8) #>
    1.57 -  setup "prem9" (style_parm_premise 9) #>
    1.58 -  setup "prem10" (style_parm_premise 10) #>
    1.59 -  setup "prem11" (style_parm_premise 11) #>
    1.60 -  setup "prem12" (style_parm_premise 12) #>
    1.61 -  setup "prem13" (style_parm_premise 13) #>
    1.62 -  setup "prem14" (style_parm_premise 14) #>
    1.63 -  setup "prem15" (style_parm_premise 15) #>
    1.64 -  setup "prem16" (style_parm_premise 16) #>
    1.65 -  setup "prem17" (style_parm_premise 17) #>
    1.66 -  setup "prem18" (style_parm_premise 18) #>
    1.67 -  setup "prem19" (style_parm_premise 19)));
    1.68 +  setup "isub" (Scan.succeed (K isub_term))));
    1.69  
    1.70  end;