Derived forminfix
Tests (23)
- elm / InfixAssocLeftArithTest`-`, `/` and `//` associate to the left.
- elm / InfixAssocPipesTest`|>` associates to the left and `<|` to the right.
- elm / InfixAssocRightConsAppendTest`::` and `++` (both precedence 5) associate to the right, so `"a" ++ "b" :: [ "c" ]` does not type.
- elm / InfixAssocRightPowTest`^` associates to the right.
- elm / InfixIfExtendsRightTestAn `if` extends as far right as it can: its `else` branch takes in a chain after it.
- elm / InfixLastOperandAnyExprTestThe last operand of a chain may be any expression: an `if` or a lambda.
- elm / InfixNegatedOperandTestA negation symbol in an operator chain negates the atomic expression after it, and no more.
- elm / InfixNonAssocSeparatedLegalTestTwo non-associative operators of equal precedence may share a chain when an operator of lower precedence stands between them.
- elm / InfixPrecAddOverConsTest`+` (precedence 6) binds more tightly than `::` (precedence 5).
- elm / InfixPrecAppendOverEqTest`++` (precedence 5) binds more tightly than `==` (precedence 4).
- elm / InfixPrecApplicationFirstTestApplication binds more tightly than any operator.
- elm / InfixPrecCompareOverAndTest`<` (precedence 4) binds more tightly than `&&` (precedence 3).
- elm / InfixPrecComposeOverPipeTest`<<` (precedence 9) binds more tightly than `|>` (precedence 0).
- elm / InfixPrecMulOverAddTest`*` (precedence 7) binds more tightly than `+` (precedence 6).
- elm / InfixPrecOrOverPipeTest`||` (precedence 2) binds more tightly than `|>` (precedence 0).
- elm / InfixPrecPowOverMulTest`^` (precedence 8) binds more tightly than `*` (precedence 7).
- elm-core / CompositionTestFunction composition with `>>` and `<<`, and the pipe operator `|>`.
- elm-core / EqualityBoolIfTestThe result of `==` and `/=` on `Bool` operands drives an `if` expression correctly.
- elm-core / FloatNegativeZeroTestNegative zero (`-0.0`) equals 0.0, and dividing 1.0 by it gives -Infinity while dividing by 0.0 gives Infinity.
- elm-core / FloatSubTestFloat subtraction gives the expected value, including when the right operand is a negative literal.
- elm-core / IntSubTestChecks integer subtraction `-`, including subtracting a negative literal.
- elm-core / NotEqualBoolIfTestThe result of `/=` on two `Bool` literals is used as the condition of an `if`, for all four combinations of operands; each logs `"yes"` exactly when the operands differ.
- elm-core / PipelineTestTests the pipeline operators `|>` and `<|`: a chain of forward pipes, a forward pipe into a partially applied local `map`, written with patterns, and a chain of backward pipes.
Discussions
Discuss this derived form·Search the discussions on GitHub
Discussions are on GitHub; one about this derived form has [df:infix] 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.