Elm Exactly

Rule 74d-atexp-paren

Atomic ExpressionsE⊢atexp⇒v\jdg{E}{\atexp}{v}
E⊢exp⇒vE⊢(exp)⇒v\frac{\begin{array}{c}\jdg{E}{\expm}{v}\end{array}}{\begin{array}{c}\jdg{E}{\kw{(}\expm\kw{)}}{v}\end{array}}
(74)
Read it in its chapter·Permanent address: /standard/rules/d-atexp-paren
TeX source
\defnrule[r:d-atexp-paren]
  {\jdg{E}{\expm}{v}}
  {\jdg{E}{\kw{(}\expm\kw{)}}{v}}

Tests (9)

  • elm / BoolAndTest
    The `&&` operator gives `True` only when both operands are `True`, checked over all four combinations.
  • elm / BoolOrTest
    The `||` operator gives `False` only when both operands are `False`, checked over all four combinations.
  • elm / MinimalParenthesesTest
    A parenthesised expression has the value of what it encloses.
  • elm / ParenthesesTest
    Parentheses around an expression, a pattern or a type change nothing but the grouping.
  • elm-core / EqualityBoolIfTest
    The result of `==` and `/=` on `Bool` operands drives an `if` expression correctly.
  • elm-core / FloatNegativeZeroTest
    Negative zero (`-0.0`) equals 0.0, and dividing 1.0 by it gives -Infinity while dividing by 0.0 gives Infinity.
  • elm-core / FloatSubTest
    Float subtraction gives the expected value, including when the right operand is a negative literal.
  • elm-core / IntSubTest
    Checks integer subtraction `-`, including subtracting a negative literal.
  • elm-core / NotEqualBoolIfTest
    The 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.

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:d-atexp-paren] 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.