src/Pure/Isar/instance.ML
changeset 25829 4b44d945702f
parent 25569 c597835d5de4
child 25864 11f531354852
equal deleted inserted replaced
25828:228c53fdb3b4 25829:4b44d945702f
    45     fun define def ctxt =
    45     fun define def ctxt =
    46       let
    46       let
    47         val def' = (apsnd o apsnd) (Syntax.check_prop ctxt) def;
    47         val def' = (apsnd o apsnd) (Syntax.check_prop ctxt) def;
    48       in Specification.definition def' ctxt end;
    48       in Specification.definition def' ctxt end;
    49     val _ = if not (null defs) then Output.legacy_feature
    49     val _ = if not (null defs) then Output.legacy_feature
    50       "Instance command with attached attached definitions; use instantiation instead." else ();
    50       "Instance command with attached definitions; use instantiation instead." else ();
    51   in if not (null defs) orelse forall (Class.is_class thy) sort
    51   in if not (null defs) orelse forall (Class.is_class thy) sort
    52   then
    52   then
    53     thy
    53     thy
    54     |> TheoryTarget.instantiation ([tyco], sorts, sort)
    54     |> TheoryTarget.instantiation ([tyco], sorts, sort)
    55     |> `(fn ctxt => map (mk_def ctxt) defs)
    55     |> `(fn ctxt => map (mk_def ctxt) defs)