Elm Exactly

Rule 50sm-explist-all

Exposing Listsmodid,I⊢explist⇒(N,N′)\jdg{\modid, I}{\explist}{(N, N')}
modid,I⊢(..)⇒(∅,Dom I)\frac{\begin{array}{c}\end{array}}{\begin{array}{c}\jdg{\modid, I}{\kw{(..)}}{(\emptyset, \Dom I)}\end{array}}
(50)
Read it in its chapter·Permanent address: /standard/rules/sm-explist-all

Comments

Everything is joined and nothing replaced, so two imports with exposing (..) of modules that both expose x make x ambiguous. The imports elaborate nevertheless, and only a use of x fails to elaborate. The operators of ops(modid)\smops(\modid) are also exposed, in the sense of Section 3.3, but no operator is bound.

TeX source
\defnrule[r:sm-explist-all]
  {}
  {\jdg{\modid, I}{\kw{(..)}}{(\emptyset, \Dom I)}}

Tests (2)

  • elm / ImportResolutionQualifiedImportedFunctionTest
    A call written with the module qualifier, `Basics.negate`, resolves to the imported function even though the module is also imported with `exposing (..)`.
  • elm / ListIndexedMapTest
    Top-level definitions named `map2`, `range` and `length` take precedence over the same names exposed by `import List exposing (..)`.

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:sm-explist-all] 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.