src/Pure/Isar/class_target.ML
changeset 31697 fd841fc9ee9e
parent 31635 8623244a50d5
child 31869 01fed718958c
equal deleted inserted replaced
31696:8b3dac635907 31697:fd841fc9ee9e
   349     val unchecks = these_unchecks thy [class];
   349     val unchecks = these_unchecks thy [class];
   350     val b = Morphism.binding morph c;
   350     val b = Morphism.binding morph c;
   351     val c' = Sign.full_name thy b;
   351     val c' = Sign.full_name thy b;
   352     val rhs' = Pattern.rewrite_term thy unchecks [] rhs;
   352     val rhs' = Pattern.rewrite_term thy unchecks [] rhs;
   353     val ty' = Term.fastype_of rhs';
   353     val ty' = Term.fastype_of rhs';
   354     val rhs'' = map_types ((*Type.strip_sorts o *)Logic.varifyT) rhs';
   354     val rhs'' = map_types Logic.varifyT rhs';
   355   in
   355   in
   356     thy
   356     thy
   357     |> Sign.add_abbrev (#1 prmode) pos (b, rhs'')
   357     |> Sign.add_abbrev (#1 prmode) pos (b, rhs'')
   358     |> snd
   358     |> snd
   359     |> Sign.add_const_constraint (c', SOME ty')
   359     |> Sign.add_const_constraint (c', SOME ty')