rename "unit" to "atom", to avoid confusion with the unit type;
authorwenzelm
Sun Aug 15 20:19:56 2010 +0200 (2010-08-15 ago)
changeset 38422f96394dba335
parent 38421 6cfc6fce7bfb
child 38423 a9cff3f2e479
rename "unit" to "atom", to avoid confusion with the unit type;
src/Pure/Isar/outer_syntax.ML
src/Pure/Thy/thy_syntax.ML
     1.1 --- a/src/Pure/Isar/outer_syntax.ML	Sun Aug 15 20:13:07 2010 +0200
     1.2 +++ b/src/Pure/Isar/outer_syntax.ML	Sun Aug 15 20:19:56 2010 +0200
     1.3 @@ -249,7 +249,7 @@
     1.4      handle ERROR msg => (Toplevel.malformed range_pos msg, true)
     1.5    end;
     1.6  
     1.7 -fun prepare_unit commands init (cmd, proof, proper_proof) =
     1.8 +fun prepare_atom commands init (cmd, proof, proper_proof) =
     1.9    let
    1.10      val (tr, proper_cmd) = prepare_span commands cmd |>> Toplevel.modify_init init;
    1.11      val proof_trs = map (prepare_span commands) proof |> filter #2 |> map #1;
    1.12 @@ -278,14 +278,14 @@
    1.13      val toks = Source.exhausted (Thy_Syntax.token_source lexs pos (Source.of_string text));
    1.14      val spans = Source.exhaust (Thy_Syntax.span_source toks);
    1.15      val _ = List.app Thy_Syntax.report_span spans;  (* FIXME ?? *)
    1.16 -    val units = Source.exhaust (Thy_Syntax.unit_source (Source.of_list spans))
    1.17 -      |> Par_List.map (prepare_unit commands init) |> flat;
    1.18 +    val atoms = Source.exhaust (Thy_Syntax.atom_source (Source.of_list spans))
    1.19 +      |> Par_List.map (prepare_atom commands init) |> flat;
    1.20  
    1.21      val _ = Present.theory_source name
    1.22        (fn () => HTML.html_mode (implode o map Thy_Syntax.present_span) spans);
    1.23  
    1.24      val _ = if time then writeln ("\n**** Starting theory " ^ quote name ^ " ****") else ();
    1.25 -    val (results, thy) = cond_timeit time "" (fn () => Toplevel.excursion units);
    1.26 +    val (results, thy) = cond_timeit time "" (fn () => Toplevel.excursion atoms);
    1.27      val _ = if time then writeln ("**** Finished theory " ^ quote name ^ " ****\n") else ();
    1.28  
    1.29      fun after_load () =
     2.1 --- a/src/Pure/Thy/thy_syntax.ML	Sun Aug 15 20:13:07 2010 +0200
     2.2 +++ b/src/Pure/Thy/thy_syntax.ML	Sun Aug 15 20:19:56 2010 +0200
     2.3 @@ -21,7 +21,7 @@
     2.4    val parse_spans: Scan.lexicon * Scan.lexicon -> Position.T -> string -> span list
     2.5    val present_span: span -> output
     2.6    val report_span: span -> unit
     2.7 -  val unit_source: (span, 'a) Source.source ->
     2.8 +  val atom_source: (span, 'a) Source.source ->
     2.9      (span * span list * bool, (span, 'a) Source.source) Source.source
    2.10  end;
    2.11  
    2.12 @@ -160,7 +160,7 @@
    2.13  
    2.14  
    2.15  
    2.16 -(** units: commands with proof **)
    2.17 +(** specification atoms: commands with optional proof **)
    2.18  
    2.19  (* scanning spans *)
    2.20  
    2.21 @@ -174,7 +174,7 @@
    2.22  val stopper = Scan.stopper (K eof) is_eof;
    2.23  
    2.24  
    2.25 -(* unit_source *)
    2.26 +(* atom_source *)
    2.27  
    2.28  local
    2.29  
    2.30 @@ -188,13 +188,13 @@
    2.31      (if d = 0 then Scan.fail else command_with Keyword.is_qed >> pair (d - 1)) ||
    2.32      Scan.unless (command_with Keyword.is_theory) (Scan.one not_eof) >> pair d)) -- Scan.state);
    2.33  
    2.34 -val unit =
    2.35 +val atom =
    2.36    command_with Keyword.is_theory_goal -- proof >> (fn (a, (bs, d)) => (a, bs, d >= 0)) ||
    2.37    Scan.one not_eof >> (fn a => (a, [], true));
    2.38  
    2.39  in
    2.40  
    2.41 -fun unit_source src = Source.source stopper (Scan.bulk unit) NONE src;
    2.42 +fun atom_source src = Source.source stopper (Scan.bulk atom) NONE src;
    2.43  
    2.44  end;
    2.45