src/Pure/pure_thy.ML
changeset 33522 737589bb9bb8
parent 33384 1b5ba4e6a953
child 33700 768d14a67256
equal deleted inserted replaced
33521:a4c54218be62 33522:737589bb9bb8
    52 
    52 
    53 (*** stored facts ***)
    53 (*** stored facts ***)
    54 
    54 
    55 (** theory data **)
    55 (** theory data **)
    56 
    56 
    57 structure FactsData = TheoryDataFun
    57 structure FactsData = Theory_Data
    58 (
    58 (
    59   type T = Facts.T * thm list;
    59   type T = Facts.T * thm list;
    60   val empty = (Facts.empty, []);
    60   val empty = (Facts.empty, []);
    61   val copy = I;
       
    62   fun extend (facts, _) = (facts, []);
    61   fun extend (facts, _) = (facts, []);
    63   fun merge _ ((facts1, _), (facts2, _)) = (Facts.merge (facts1, facts2), []);
    62   fun merge ((facts1, _), (facts2, _)) = (Facts.merge (facts1, facts2), []);
    64 );
    63 );
    65 
    64 
    66 
    65 
    67 (* facts *)
    66 (* facts *)
    68 
    67 
   244  [("",       typ "'a => cargs",                  Delimfix "_"),
   243  [("",       typ "'a => cargs",                  Delimfix "_"),
   245   ("_cargs", typ "'a => cargs => cargs",         Mixfix ("_/ _", [1000, 1000], 1000)),
   244   ("_cargs", typ "'a => cargs => cargs",         Mixfix ("_/ _", [1000, 1000], 1000)),
   246   ("_applC", typ "('b => 'a) => cargs => logic", Mixfix ("(1_/ _)", [1000, 1000], 999)),
   245   ("_applC", typ "('b => 'a) => cargs => logic", Mixfix ("(1_/ _)", [1000, 1000], 999)),
   247   ("_applC", typ "('b => 'a) => cargs => aprop", Mixfix ("(1_/ _)", [1000, 1000], 999))];
   246   ("_applC", typ "('b => 'a) => cargs => aprop", Mixfix ("(1_/ _)", [1000, 1000], 999))];
   248 
   247 
   249 structure OldApplSyntax = TheoryDataFun
   248 structure OldApplSyntax = Theory_Data
   250 (
   249 (
   251   type T = bool;
   250   type T = bool;
   252   val empty = false;
   251   val empty = false;
   253   val copy = I;
       
   254   val extend = I;
   252   val extend = I;
   255   fun merge _ (b1, b2) : T =
   253   fun merge (b1, b2) : T =
   256     if b1 = b2 then b1
   254     if b1 = b2 then b1
   257     else error "Cannot merge theories with different application syntax";
   255     else error "Cannot merge theories with different application syntax";
   258 );
   256 );
   259 
   257 
   260 val old_appl_syntax = OldApplSyntax.get;
   258 val old_appl_syntax = OldApplSyntax.get;
   267 
   265 
   268 (* main content *)
   266 (* main content *)
   269 
   267 
   270 val _ = Context.>> (Context.map_theory
   268 val _ = Context.>> (Context.map_theory
   271   (Sign.map_naming (Name_Space.set_theory_name Context.PureN) #>
   269   (Sign.map_naming (Name_Space.set_theory_name Context.PureN) #>
   272    OldApplSyntax.init #>
   270    OldApplSyntax.put false #>
   273    Sign.add_types
   271    Sign.add_types
   274    [(Binding.name "fun", 2, NoSyn),
   272    [(Binding.name "fun", 2, NoSyn),
   275     (Binding.name "prop", 0, NoSyn),
   273     (Binding.name "prop", 0, NoSyn),
   276     (Binding.name "itself", 1, NoSyn),
   274     (Binding.name "itself", 1, NoSyn),
   277     (Binding.name "dummy", 0, NoSyn)]
   275     (Binding.name "dummy", 0, NoSyn)]