equal
deleted
inserted
replaced
218 text %quote {*@{code_stmts collect_duplicates (SML)}*} |
218 text %quote {*@{code_stmts collect_duplicates (SML)}*} |
219 |
219 |
220 text {* |
220 text {* |
221 \noindent Obviously, polymorphic equality is implemented the Haskell |
221 \noindent Obviously, polymorphic equality is implemented the Haskell |
222 way using a type class. How is this achieved? HOL introduces an |
222 way using a type class. How is this achieved? HOL introduces an |
223 explicit class @{class eq} with a corresponding operation @{const |
223 explicit class @{class equal} with a corresponding operation @{const |
224 eq_class.eq} such that @{thm eq [no_vars]}. The preprocessing |
224 HOL.equal} such that @{thm equal [no_vars]}. The preprocessing |
225 framework does the rest by propagating the @{class eq} constraints |
225 framework does the rest by propagating the @{class equal} constraints |
226 through all dependent code equations. For datatypes, instances of |
226 through all dependent code equations. For datatypes, instances of |
227 @{class eq} are implicitly derived when possible. For other types, |
227 @{class equal} are implicitly derived when possible. For other types, |
228 you may instantiate @{text eq} manually like any other type class. |
228 you may instantiate @{text equal} manually like any other type class. |
229 *} |
229 *} |
230 |
230 |
231 |
231 |
232 subsection {* Explicit partiality \label{sec:partiality} *} |
232 subsection {* Explicit partiality \label{sec:partiality} *} |
233 |
233 |