src/Pure/Isar/class.ML
changeset 28861 f53abb0733ee
parent 28822 7ca11ecbc4fb
child 28941 128459bd72d2
equal deleted inserted replaced
28860:b1d46059d502 28861:f53abb0733ee
   511     val rhs' = Pattern.rewrite_term thy unchecks [] rhs;
   511     val rhs' = Pattern.rewrite_term thy unchecks [] rhs;
   512     val rhs'' = map_types Logic.varifyT rhs';
   512     val rhs'' = map_types Logic.varifyT rhs';
   513     val ty' = Term.fastype_of rhs';
   513     val ty' = Term.fastype_of rhs';
   514   in
   514   in
   515     thy'
   515     thy'
   516     |> Sign.add_abbrev (#1 prmode) pos (c, map_types Type.strip_sorts rhs'') |> snd
   516     |> Sign.add_abbrev (#1 prmode) pos (Name.binding c, map_types Type.strip_sorts rhs'') |> snd
   517     |> Sign.add_const_constraint (c', SOME ty')
   517     |> Sign.add_const_constraint (c', SOME ty')
   518     |> Sign.notation true prmode [(Const (c', ty'), mx)]
   518     |> Sign.notation true prmode [(Const (c', ty'), mx)]
   519     |> not (#1 prmode = PrintMode.input) ? register_operation class (c', (rhs', NONE))
   519     |> not (#1 prmode = PrintMode.input) ? register_operation class (c', (rhs', NONE))
   520     |> Sign.restore_naming thy
   520     |> Sign.restore_naming thy
   521   end;
   521   end;