equal
deleted
inserted
replaced
137 (case AList.lookup (op =) overloading (c, ty) of |
137 (case AList.lookup (op =) overloading (c, ty) of |
138 SOME (v, _) => SOME (ty, Free (v, ty)) |
138 SOME (v, _) => SOME (ty, Free (v, ty)) |
139 | NONE => NONE); |
139 | NONE => NONE); |
140 val unchecks = |
140 val unchecks = |
141 map (fn (c_ty as (_, ty), (v, _)) => (Free (v, ty), Const c_ty)) overloading; |
141 map (fn (c_ty as (_, ty), (v, _)) => (Free (v, ty), Const c_ty)) overloading; |
142 in |
142 in |
143 ctxt |
143 ctxt |
144 |> map_improvable_syntax (K {primary_constraints = [], |
144 |> map_improvable_syntax (K {primary_constraints = [], |
145 secondary_constraints = [], improve = K NONE, subst = subst, |
145 secondary_constraints = [], improve = K NONE, subst = subst, |
146 no_subst_in_abbrev_mode = false, unchecks = unchecks}) |
146 no_subst_in_abbrev_mode = false, unchecks = unchecks}) |
147 end; |
147 end; |
166 fun pretty lthy = |
166 fun pretty lthy = |
167 let |
167 let |
168 val overloading = get_overloading lthy; |
168 val overloading = get_overloading lthy; |
169 fun pr_operation ((c, ty), (v, _)) = |
169 fun pr_operation ((c, ty), (v, _)) = |
170 Pretty.block (Pretty.breaks |
170 Pretty.block (Pretty.breaks |
171 [Pretty.str v, Pretty.str "==", Proof_Context.pretty_const lthy c, |
171 [Pretty.str v, Pretty.str "\<equiv>", Proof_Context.pretty_const lthy c, |
172 Pretty.str "::", Syntax.pretty_typ lthy ty]); |
172 Pretty.str "::", Syntax.pretty_typ lthy ty]); |
173 in |
173 in |
174 [Pretty.block |
174 [Pretty.block |
175 (Pretty.fbreaks (Pretty.keyword1 "overloading" :: map pr_operation overloading))] |
175 (Pretty.fbreaks (Pretty.keyword1 "overloading" :: map pr_operation overloading))] |
176 end; |
176 end; |