src/Pure/sign.ML
changeset 16988 02cd0c8b96d9
parent 16941 0bda949449ee
child 17037 bd15f69bd947
equal deleted inserted replaced
16987:9ed901d738ba 16988:02cd0c8b96d9
   670 
   670 
   671 (* add constants *)
   671 (* add constants *)
   672 
   672 
   673 fun gen_add_consts prep_typ raw_args thy =
   673 fun gen_add_consts prep_typ raw_args thy =
   674   let
   674   let
   675     val prepT = compress_type o Type.varifyT o Type.no_tvars o Term.no_dummyT o prep_typ thy;
   675     val prepT = Compress.typ thy o Type.varifyT o Type.no_tvars o Term.no_dummyT o prep_typ thy;
   676     fun prep (c, T, mx) = ((c, prepT T, mx) handle TYPE (msg, _, _) => error msg)
   676     fun prep (c, T, mx) = ((c, prepT T, mx) handle TYPE (msg, _, _) => error msg)
   677       handle ERROR => error ("in declaration of constant " ^ quote (Syntax.const_name c mx));
   677       handle ERROR => error ("in declaration of constant " ^ quote (Syntax.const_name c mx));
   678     val args = map prep raw_args;
   678     val args = map prep raw_args;
   679     val decls = args |> map (fn (c, T, mx) => (Syntax.const_name c mx, (T, stamp ())));
   679     val decls = args |> map (fn (c, T, mx) => (Syntax.const_name c mx, (T, stamp ())));
   680 
   680