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