Elm Exactly
Results / elm-core /

CharAstralDebugLogTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Debug.log` prints an astral `Char` (code point above 0xFFFF) as the
character itself in single quotes, whether written as a literal, made with
`Char.fromCode`, or inside `Just`, and prints a non-ASCII character below
0xFFFF, `'โ‚ฌ'`, the same way.

Results

elm-0.19.1

passran in 61 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
dbg_astral: '๐Ÿ˜€'
dbg_fromcode: '๐„ž'
dbg_bmp: 'โ‚ฌ'
dbg_maybe: Just '๐Ÿ˜€'

elm-0.19.2

passran in 57 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
dbg_astral: '๐Ÿ˜€'
dbg_fromcode: '๐„ž'
dbg_bmp: 'โ‚ฌ'
dbg_maybe: Just '๐Ÿ˜€'

elm-0.19.3

passran in 67 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
dbg_astral: '๐Ÿ˜€'
dbg_fromcode: '๐„ž'
dbg_bmp: 'โ‚ฌ'
dbg_maybe: Just '๐Ÿ˜€'

lamdera-1.5.0

passran in 45 ms
Output
dbg_astral: '๐Ÿ˜€'
dbg_fromcode: '๐„ž'
dbg_bmp: 'โ‚ฌ'
dbg_maybe: Just '๐Ÿ˜€'

Discussions

Discuss this testยทSearch the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module CharAstralDebugLogTest exposing (main)
{-| `Debug.log` prints an astral `Char` (code point above 0xFFFF) as the
character itself in single quotes, whether written as a literal, made with
`Char.fromCode`, or inside `Just`, and prints a non-ASCII character below
0xFFFF, `'โ‚ฌ'`, the same way.
-}
-- CHECK: dbg_astral: '๐Ÿ˜€'
-- CHECK: dbg_fromcode: '๐„ž'
-- CHECK: dbg_bmp: 'โ‚ฌ'
-- CHECK: dbg_maybe: Just '๐Ÿ˜€'
import Html exposing (text)
main =
let
_ =
Debug.log "dbg_astral" '๐Ÿ˜€'
_ =
Debug.log "dbg_fromcode" (Char.fromCode 0x0001D11E)
_ =
Debug.log "dbg_bmp" 'โ‚ฌ'
_ =
Debug.log "dbg_maybe" (Just '๐Ÿ˜€')
in
text "done"