Rule 22s-ty-tyvar
Type Expressions
(22)
Comments
Rules (22) and (23) both cover the phrase . Since is unambiguous, at most one of them applies, according to whether the variable of named by is a type variable or a row variable. A type variable that is not explicit in does not elaborate: every type variable of an annotation is made explicit by rule (20), and Chapter 5 makes the parameters of type declarations explicit in the same way.
Referred to from
TeX source
\defnrule[r:s-ty-tyvar]
{\tyvar = \alpha \premsep \alpha \in U \of C}
{\jdg{C}{\tyvar}{\alpha}}Tests (3)
- elm / FunctionCompappendWithStringTestA function whose arguments have the `compappend` constraint (comparable and appendable) works when called with `String`s.
- elm / MinimalTypeVariableTestAn annotation with a type variable.
- elm / TypeClassConstraintTestChecks functions whose types use the constrained type variables `number`, `comparable` and `appendable`.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-ty-tyvar] 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.