equal
deleted
inserted
replaced
603 ML {* Old_Datatype_Data.get_info @{theory} @{type_name even_nat} *} |
603 ML {* Old_Datatype_Data.get_info @{theory} @{type_name even_nat} *} |
604 |
604 |
605 text {* |
605 text {* |
606 The syntactic entity \synt{name} denotes an identifier \cite{isabelle-isar-ref}. |
606 The syntactic entity \synt{name} denotes an identifier \cite{isabelle-isar-ref}. |
607 |
607 |
608 The command is interesting because the old datatype package provides some |
608 The command can be useful because the old datatype package provides some |
609 functionality that is not yet replicated in the new package, such as the |
609 functionality that is not yet replicated in the new package. |
610 integration with Quickcheck. |
|
611 |
610 |
612 A few remarks concern nested recursive datatypes: |
611 A few remarks concern nested recursive datatypes: |
613 |
612 |
614 \begin{itemize} |
613 \begin{itemize} |
615 \setlength{\itemsep}{0pt} |
614 \setlength{\itemsep}{0pt} |
620 |
619 |
621 \item All types through which recursion takes place must be new-style datatypes |
620 \item All types through which recursion takes place must be new-style datatypes |
622 or the function type. In principle, it should be possible to support old-style |
621 or the function type. In principle, it should be possible to support old-style |
623 datatypes as well, but this has not been implemented yet (and there is currently |
622 datatypes as well, but this has not been implemented yet (and there is currently |
624 no way to register old-style datatypes as new-style datatypes). |
623 no way to register old-style datatypes as new-style datatypes). |
625 |
|
626 \item The recursor produced for types that recurse through functions has a |
|
627 different signature than with the old package. This might affect the behavior of |
|
628 some third-party extensions. |
|
629 \end{itemize} |
624 \end{itemize} |
630 |
625 |
631 An alternative to @{command datatype_compat} is to use the old package's |
626 An alternative to @{command datatype_compat} is to use the old package's |
632 \keyw{rep_\allowbreak datatype} command. The associated proof obligations must then be |
627 \keyw{rep_\allowbreak datatype} command. The associated proof obligations must then be |
633 discharged manually. |
628 discharged manually. |