equal
deleted
inserted
replaced
757 } |
757 } |
758 \isamarkuptrue% |
758 \isamarkuptrue% |
759 % |
759 % |
760 \begin{isamarkuptext}% |
760 \begin{isamarkuptext}% |
761 Isabelle/Pure's definitional schemes support certain forms of |
761 Isabelle/Pure's definitional schemes support certain forms of |
762 overloading (see \secref{sec:consts}). At most occassions |
762 overloading (see \secref{sec:consts}). Overloading means that a |
|
763 constant being declared as \isa{{\isachardoublequote}c\ {\isacharcolon}{\isacharcolon}\ {\isasymalpha}\ decl{\isachardoublequote}} may be |
|
764 defined separately on type instances |
|
765 \isa{{\isachardoublequote}c\ {\isacharcolon}{\isacharcolon}\ {\isacharparenleft}{\isasymbeta}\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ {\isasymbeta}\isactrlsub n{\isacharparenright}\ t\ decl{\isachardoublequote}} |
|
766 for each type constructor \isa{t}. At most occassions |
763 overloading will be used in a Haskell-like fashion together with |
767 overloading will be used in a Haskell-like fashion together with |
764 type classes by means of \hyperlink{command.instantiation}{\mbox{\isa{\isacommand{instantiation}}}} (see |
768 type classes by means of \hyperlink{command.instantiation}{\mbox{\isa{\isacommand{instantiation}}}} (see |
765 \secref{sec:class}). Sometimes low-level overloading is desirable. |
769 \secref{sec:class}). Sometimes low-level overloading is desirable. |
766 The \hyperlink{command.overloading}{\mbox{\isa{\isacommand{overloading}}}} target provides a convenient view for |
770 The \hyperlink{command.overloading}{\mbox{\isa{\isacommand{overloading}}}} target provides a convenient view for |
767 end-users. |
771 end-users. |
786 tools, using the names \isa{{\isachardoublequote}x\isactrlsub i{\isachardoublequote}} as reference to the |
790 tools, using the names \isa{{\isachardoublequote}x\isactrlsub i{\isachardoublequote}} as reference to the |
787 corresponding constants. The target is concluded by \hyperlink{command.local.end}{\mbox{\isa{\isacommand{end}}}}. |
791 corresponding constants. The target is concluded by \hyperlink{command.local.end}{\mbox{\isa{\isacommand{end}}}}. |
788 |
792 |
789 A \isa{{\isachardoublequote}{\isacharparenleft}unchecked{\isacharparenright}{\isachardoublequote}} option disables global dependency checks for |
793 A \isa{{\isachardoublequote}{\isacharparenleft}unchecked{\isacharparenright}{\isachardoublequote}} option disables global dependency checks for |
790 the corresponding definition, which is occasionally useful for |
794 the corresponding definition, which is occasionally useful for |
791 exotic overloading. It is at the discretion of the user to avoid |
795 exotic overloading (see \secref{sec:consts} for a precise description). |
|
796 It is at the discretion of the user to avoid |
792 malformed theory specifications! |
797 malformed theory specifications! |
793 |
798 |
794 \end{description}% |
799 \end{description}% |
795 \end{isamarkuptext}% |
800 \end{isamarkuptext}% |
796 \isamarkuptrue% |
801 \isamarkuptrue% |
1090 provide definitional principles that can be used to express |
1095 provide definitional principles that can be used to express |
1091 recursion safely. |
1096 recursion safely. |
1092 |
1097 |
1093 \end{itemize} |
1098 \end{itemize} |
1094 |
1099 |
1095 Overloading means that a constant being declared as \isa{{\isachardoublequote}c\ {\isacharcolon}{\isacharcolon}\ {\isasymalpha}\ decl{\isachardoublequote}} may be defined separately on type instances \isa{{\isachardoublequote}c\ {\isacharcolon}{\isacharcolon}\ {\isacharparenleft}{\isasymbeta}\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ {\isasymbeta}\isactrlsub n{\isacharparenright}\ t\ decl{\isachardoublequote}} for each type constructor \isa{t}. The right-hand side may mention overloaded constants |
1100 The right-hand side of overloaded definitions may mention overloaded constants |
1096 recursively at type instances corresponding to the immediate |
1101 recursively at type instances corresponding to the immediate |
1097 argument types \isa{{\isachardoublequote}{\isasymbeta}\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ {\isasymbeta}\isactrlsub n{\isachardoublequote}}. Incomplete |
1102 argument types \isa{{\isachardoublequote}{\isasymbeta}\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ {\isasymbeta}\isactrlsub n{\isachardoublequote}}. Incomplete |
1098 specification patterns impose global constraints on all occurrences, |
1103 specification patterns impose global constraints on all occurrences, |
1099 e.g.\ \isa{{\isachardoublequote}d\ {\isacharcolon}{\isacharcolon}\ {\isasymalpha}\ {\isasymtimes}\ {\isasymalpha}{\isachardoublequote}} on the left-hand side means that all |
1104 e.g.\ \isa{{\isachardoublequote}d\ {\isacharcolon}{\isacharcolon}\ {\isasymalpha}\ {\isasymtimes}\ {\isasymalpha}{\isachardoublequote}} on the left-hand side means that all |
1100 corresponding occurrences on some right-hand side need to be an |
1105 corresponding occurrences on some right-hand side need to be an |