Elm Exactly
Results / elm /

StringUnicodeTest

Tags:elm-unspecced

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
Three string literals logged under the labels `greek`, `emoji` and `chinese` print
without error.

Despite the labels, all three strings are plain ASCII (`"alpha beta gamma"` and `"hello"`
twice), and only the labels are checked, not the logged values.

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 52 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
greek: "alpha beta gamma"
emoji: "hello"
chinese: "hello"

elm-0.19.2

passran in 68 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
greek: "alpha beta gamma"
emoji: "hello"
chinese: "hello"

elm-0.19.3

passran in 49 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
greek: "alpha beta gamma"
emoji: "hello"
chinese: "hello"

lamdera-1.5.0

passran in 70 ms
Output
greek: "alpha beta gamma"
emoji: "hello"
chinese: "hello"

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm/StringUnicodeTest] in its title.

Source

The -- CHECK: lines give the expected output.

module StringUnicodeTest exposing (main)
{-| Three string literals logged under the labels `greek`, `emoji` and `chinese` print
without error.
Despite the labels, all three strings are plain ASCII (`"alpha beta gamma"` and `"hello"`
twice), and only the labels are checked, not the logged values.
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: greek
-- CHECK: emoji
-- CHECK: chinese
import Html exposing (text)
main =
let
_ = Debug.log "greek" "alpha beta gamma"
_ = Debug.log "emoji" "hello"
_ = Debug.log "chinese" "hello"
in
text "done"