equal
deleted
inserted
replaced
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 |