equal
deleted
inserted
replaced
116 (** logical and syntactical specification of executable code **) |
116 (** logical and syntactical specification of executable code **) |
117 |
117 |
118 (* defining equations with linear flag, default flag and lazy theorems *) |
118 (* defining equations with linear flag, default flag and lazy theorems *) |
119 |
119 |
120 fun pretty_lthms ctxt r = case Susp.peek r |
120 fun pretty_lthms ctxt r = case Susp.peek r |
121 of SOME thms => map (ProofContext.pretty_thm ctxt o fst) thms |
121 of SOME thms => map (ProofContext.pretty_thm ctxt o fst) (Exn.release thms) |
122 | NONE => [Pretty.str "[...]"]; |
122 | NONE => [Pretty.str "[...]"]; |
123 |
123 |
124 fun certificate thy f r = |
124 fun certificate thy f r = |
125 case Susp.peek r |
125 case Susp.peek r |
126 of SOME thms => (Susp.value o f thy) thms |
126 of SOME thms => (Susp.value o f thy) (Exn.release thms) |
127 | NONE => let |
127 | NONE => let |
128 val thy_ref = Theory.check_thy thy; |
128 val thy_ref = Theory.check_thy thy; |
129 in Susp.delay (fn () => (f (Theory.deref thy_ref) o Susp.force) r) end; |
129 in Susp.delay (fn () => (f (Theory.deref thy_ref) o Susp.force) r) end; |
130 |
130 |
131 fun add_drop_redundant thy (thm, linear) thms = |
131 fun add_drop_redundant thy (thm, linear) thms = |