Figureappendix-standard-ml-polymorphism
| Feature | Standard ML | Elm (this definition) | Where defined here |
| Value polymorphism | A value restriction: only a non-expansive expression has its type generalised. | No value restriction: closure applies to every binding, whatever its expression. | Sec. 4.8; Sec. 4.9 |
| Explicit type variables | Bound at a value declaration, explicitly (val 'a) or implicitly at the outermost value declaration in which they occur. Type constraints : on any expression or pattern. | No binder: the type variables of an annotation scope over the annotations nested in its definition, and may not escape it. Annotations are given only for definitions and ports. | Sec. 4.7 |
Referred to from
Tests (0)
No test of the suite checks this figure yet.
Discussions
Discuss this figure·Search the discussions on GitHub
Discussions are on GitHub; one about this figure has [fig:appendix-standard-ml-polymorphism] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.