Elm Exactly

Rule 129dm-topdec-seq

Top-level DeclarationsE⊢topdec⇒I\jdg{E}{\topdec}{I}
E⊢topdec1⇒(RA1,CE1,VE1)E+VE1⊢topdec2⇒I2E⊢topdec1 ; topdec2⇒(RA1,CE1,VE1)+I2\frac{\begin{array}{c}\jdg{E}{\topdec_1}{(\dmRA_1,\dmCE_1,\VE_1)}\premsep \jdg{E+\VE_1}{\topdec_2}{I_2}\end{array}}{\begin{array}{c}\jdg{E}{\topdec_1\ \kw{;}\ \topdec_2}{(\dmRA_1,\dmCE_1,\VE_1)+I_2}\end{array}}
(129)
Read it in its chapter·Permanent address: /standard/rules/dm-topdec-seq

Comments

By the derived forms of Section A.2, topdec\topdec consists of the custom-type group, then the aliases, then the ports and value groups in dependency order, so every declaration is evaluated after each declaration it refers to. Where that order leaves two declarations unordered, either order gives the same result.

Referred to from

TeX source
\defnrule[r:dm-topdec-seq]
  {\jdg{E}{\topdec_1}{(\dmRA_1,\dmCE_1,\VE_1)}\premsep
   \jdg{E+\VE_1}{\topdec_2}{I_2}}
  {\jdg{E}{\topdec_1\ \kw{;}\ \topdec_2}{(\dmRA_1,\dmCE_1,\VE_1)+I_2}}

Tests (4)

  • elm / CombinatorTest
    SKI-style combinators, most of them built from S and K, each applied to `Int` arguments and printing its result.
  • elm / FunctionBasicTest
    Simple unannotated top-level functions of one and two arguments return the right values.
  • elm / ListIndexedMapTest
    Top-level definitions named `map2`, `range` and `length` take precedence over the same names exposed by `import List exposing (..)`.
  • elm / MinimalVariableTest
    A top-level variable denotes the value of its definition.

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:dm-topdec-seq] 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.