Elm Exactly

Rule 162e-dec-nothing

DecodingDecτ(j)=v\Dec{\tau}(j)=v
Decτ Maybe(null)=Nothing\frac{\begin{array}{c}\end{array}}{\begin{array}{c}\Dec{\tau\,\tMaybe}(\effnull)=\kw{Nothing}\end{array}}
(162)
Read it in its chapter·Permanent address: /standard/rules/e-dec-nothing

Referred to from

TeX source
\defnrule[r:e-dec-nothing]
  {}
  {\Dec{\tau\,\tMaybe}(\effnull)=\kw{Nothing}}

Tests (6)

  • elm / MinimalPipeNothingTest
    A pipe at `Maybe Int`: the value the driver sends in comes back out.
  • elm / PortEchoMaybeIntTest
    A `Maybe Int` sent out through a port comes back unchanged through an incoming port, for each of three sample values.
  • elm / PortEchoNestedTest
    A `List (Maybe ( Int, List String ))` sent out through a port comes back unchanged through an incoming port, for each of two sample values.
  • elm / PortPipeMaybeTest
    JSON `null` and other values received at `Maybe` types go out as they came.
  • elm / StandardA72AbsentFlagsTest
    A program given no flags starts with flags `null`: `Maybe` flags are `Nothing`.
  • elm / StandardA88PortNonFiniteTest
    A NaN or an infinity sent out through a port arrives as JSON `null`.

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:e-dec-nothing] 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.