src/HOL/Tools/Datatype/datatype_data.ML
changeset 56375 32e0da92c786
parent 55952 2f85cc6c27d4
child 56858 0c3d0bc98abe
equal deleted inserted replaced
56374:dfc7a46c2900 56375:32e0da92c786
   263 structure Datatype_Interpretation = Interpretation
   263 structure Datatype_Interpretation = Interpretation
   264 (
   264 (
   265   type T = Datatype_Aux.config * string list;
   265   type T = Datatype_Aux.config * string list;
   266   val eq: T * T -> bool = eq_snd (op =);
   266   val eq: T * T -> bool = eq_snd (op =);
   267 );
   267 );
   268 fun interpretation f = Datatype_Interpretation.interpretation (uncurry f);
   268 
       
   269 fun with_repaired_path f config (type_names as name :: _) thy =
       
   270   thy
       
   271   |> Sign.root_path
       
   272   |> Sign.add_path (Long_Name.qualifier name)
       
   273   |> f config type_names
       
   274   |> Sign.restore_naming thy;
       
   275 
       
   276 fun interpretation f = Datatype_Interpretation.interpretation (uncurry (with_repaired_path f));
   269 val interpretation_data = Datatype_Interpretation.data;
   277 val interpretation_data = Datatype_Interpretation.data;
   270 
   278 
   271 
   279 
   272 
   280 
   273 (** setup theory **)
   281 (** setup theory **)