Rule 29s-ty-fun
Type Expressions
(29)
TeX source
\defnrule[r:s-ty-fun]
{\jdg{C}{\ty}{\tau} \premsep \jdg{C}{\ty'}{\tau'}}
{\jdg{C}{\ty\ \kw{->}\ \ty'}{\tau \rightarrow \tau'}}Tests (3)
- elm / MinimalTypeVariableTestAn annotation with a type variable.
- elm / TypeMismatchFunctionInATypeArgumentTestThe compiler rejects a list holding `Just not` as the body of a definition annotated `Maybe (Int -> Int)`, with a TYPE MISMATCH error.
- elm / TypeMismatchOneArgumentFunctionWhereTwoTestDefining `f : Int -> Int -> Int` as a function of type `Int -> Int` (`f = g`) is rejected with a TYPE MISMATCH error.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:s-ty-fun] 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.