Does Elm have a debugging function that can print an object to the console?
Unfortunately, no. All objects are converted to strings before they are sent to the console when you use Debug.log
.
You can however create a function that would output the actual object using the Native layer however, this is an undocumented API and it is advisable to use it only as a last resort.
You can use Debug.log
, for example:
import Html exposing (text)
f x = x * x
main =
let
dummy = Debug.log "dump tuple" (33, 55, f)
in text "Hello, World!"