-
-
Notifications
You must be signed in to change notification settings - Fork 154
Labels
Milestone
Description
It would be nice to preserve some of the debug information for complex types so that Debug.log
would be more useful. This would only take effect when developing, not when doing a production (minified) bundle.
Some examples are below (generated names can be differnet)
record Point2D {
x : Number,
y : Number
}
component Main {
fun foo {
""
}
fun componentDidMount {
/*
Prints `r {x:0, y:0}`
It would be nice if this was `Point2D {x:0, y:0}`
*/
Debug.log(Point2D(0, 0))
/*
Prints an object `AI {_0: 'hello world', length: 1}`
It would be nice if it would print the as-is `Maybe::Just("hello world")`
*/
Debug.log(Maybe::Just("hello world"))
/*
Prints `ƒ a() { return ''; }`
It would be nice if this set the function name so it would print `ƒ foo() { return ''; }`
*/
Debug.log(foo)
}
fun render : Html {
<div/>
}
}