src/HOL/datatype.ML
changeset 4970 8b65444edbb0
parent 4874 c66a42846887
equal deleted inserted replaced
4969:61fd5c1d733f 4970:8b65444edbb0
   207     end ;
   207     end ;
   208 
   208 
   209 in
   209 in
   210   fun add_datatype (typevars, tname, cons_list') thy = 
   210   fun add_datatype (typevars, tname, cons_list') thy = 
   211     let
   211     let
   212       val dummy = Theory.require thy "Arith" "datatype definitions";
   212       val dummy = Theory.requires thy "Arith" "datatype definitions";
   213       
   213       
   214       fun typid(dtRek(_,id)) = id
   214       fun typid(dtRek(_,id)) = id
   215         | typid(dtVar s) = implode (tl (explode s))
   215         | typid(dtVar s) = implode (tl (explode s))
   216         | typid(dtTyp(_,id)) = id;
   216         | typid(dtTyp(_,id)) = id;
   217 
   217