262 |
262 |
263 Overloading means that a constant being declared as $c :: \alpha\, |
263 Overloading means that a constant being declared as $c :: \alpha\, |
264 decl$ may be defined separately on type instances $c :: |
264 decl$ may be defined separately on type instances $c :: |
265 (\vec\beta)\,t\,decl$ for each type constructor $t$. The RHS may |
265 (\vec\beta)\,t\,decl$ for each type constructor $t$. The RHS may |
266 mention overloaded constants recursively at type instances |
266 mention overloaded constants recursively at type instances |
267 corresponding to the immediate argument types $\vec\beta$. This |
267 corresponding to the immediate argument types $\vec\beta$. Incomplete |
268 scheme covers the disciplined overloading of Haskell98, although |
268 specification patterns impose global constraints on all occurrences, |
269 Isabelle does not demand an exact correspondence to type class and |
269 e.g. $d :: \alpha \times \alpha$ on the LHS means that all |
270 instance declarations. |
270 corresponding occurrences on some RHS need to be an instance of this, |
271 |
271 general $d :: \alpha \times \beta$ will be disallowed. |
272 There is an internal dependency graph of all overloaded and |
|
273 non-overloaded definitions, which ensures that the collection of |
|
274 interdependent constants in a theory can still be interpreted in terms |
|
275 of the basic logic. |
|
276 |
272 |
277 \indexisarcmd{consts}\indexisarcmd{defs}\indexisarcmd{constdefs}\indexoutertoken{constdecl} |
273 \indexisarcmd{consts}\indexisarcmd{defs}\indexisarcmd{constdefs}\indexoutertoken{constdecl} |
278 \begin{matharray}{rcl} |
274 \begin{matharray}{rcl} |
279 \isarcmd{consts} & : & \isartrans{theory}{theory} \\ |
275 \isarcmd{consts} & : & \isartrans{theory}{theory} \\ |
280 \isarcmd{defs} & : & \isartrans{theory}{theory} \\ |
276 \isarcmd{defs} & : & \isartrans{theory}{theory} \\ |