AddTest
Tags:elm-unspecced
`Debug.log` prints an `Int` bound in a `let`. Despite the module's name, the program does no addition: it logs the literal 42. A Standard Definition of Elm? does not decide this test: `Debug.log l v` evaluates to `v`, and any output it makes, its text, its order and whether it is made at all, is outside the definition (ruling A62).
Results
elm-0.19.1
passran in 51 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. AddTest: 42
elm-0.19.2
passran in 46 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. AddTest: 42
elm-0.19.3
passran in 61 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. AddTest: 42
lamdera-1.5.0
passran in 69 msOutput
AddTest: 42
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm/AddTest] in its title.
Source
The -- CHECK: lines give the expected output.
module AddTest exposing (main)
{-| `Debug.log` prints an `Int` bound in a `let`.
Despite the module's name, the program does no addition: it logs the literal
42.
A Standard Definition of Elm? does not decide this test: `Debug.log l v` evaluates to `v`, and any
output it makes, its text, its order and whether it is made at all, is outside the definition
(ruling A62).
-}
-- TAGS: elm-unspecced
-- CHECK: AddTest: 42
import Html exposing (text)
main =
let
result =
42
_ =
Debug.log "AddTest" result
in
text "hello"